0 Replies Latest reply on Oct 23, 2003 10:25 AM by crazypalm

    Deserializing parameter Problem!!!

    crazypalm Newbie

      Hi, All

      Anyone could give me some help, thanks a lot:

      The web-service.xml file:
      <?xml version="1.0" encoding="UTF-8"?>

      <deployment
      xmlns="http://xml.apache.org/axis/wsdd/"
      targetNamespace="http://net.jboss.org/hello"
      xmlns:hello="http://net.jboss.org/hello"
      xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
      <!-- this is an extension to the Axis deployment descriptor which allows to
      specify the naming environment for the deployed ws logic -->
















      <typeMapping
      xmlns:ns="SoapDriver"
      qname="MmmscObject"
      type="java:uk.generic.MmscObject"
      serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
      deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      />
      <typeMapping
      xmlns:ns="SoapDriver"
      qname="MessageResponseCore"
      type="java:uk.dto.MessageResponseCore"
      serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
      deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      />
      <typeMapping
      xmlns:ns="SoapDriver"
      qname="MessageResponse"
      type="java:uk.dto.MessageResponse"
      serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
      deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      />



      The Client program:
      ...
      QName mmscQName = new QName("SoapDriver", "MmscObject");
      call.registerTypeMapping(MmscObject.class, mmscQName, new BeanSerializerFactory(MmscObject.class,mmscQName),
      new BeanDeserializerFactory(MmscObject.class,mmscQName));

      QName mrcQName = new QName("SoapDriver", "MessageResponseCore");
      call.registerTypeMapping(MessageResponseCore.class, mrcQName, new BeanSerializerFactory(MessageResponseCore.class,mrcQName),
      new BeanDeserializerFactory(MessageResponseCore.class,mrcQName));

      QName mrQName = new QName("SoapDriver", "MessageResponse");
      tm.register(MessageResponse.class, mrQName, new BeanSerializerFactory(MessageResponse.class,mrQName), new
      BeanDeserializerFactory(MessageResponse.class,mrQName));
      ...

      call.setReturnType(org.apache.axis.Constants.XSD_ANY);
      rpdto = (MessageResponse) call.invoke( new Object[] { para1, .., para11} );
      ------------------------------------------------------------------------------------->
      where MessageResponse extends MmscObject, and conclude MessageResponseCore, they are all serializable.

      using TCPMON, I can capture both the request and response, but got error:------------------------------------------------------------------>

      org.xml.sax.SAXException: Deserializing parameter 'SoapToMessageDispatcherReturn': could not find deserializer for type MessageResponse
      at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:276)
      at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:893)
      at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:200)
      at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:684)
      at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:241)
      at org.apache.axis.message.RPCElement.getParams(RPCElement.java:265)
      at org.apache.axis.client.Call.invoke(Call.java:1871)
      at org.apache.axis.client.Call.invoke(Call.java:1777)
      at org.apache.axis.client.Call.invoke(Call.java:1315)
      at uk.dialogue.mmsc.DriverManager.ejb.SoapDriverTools.processSoapRequest(SoapDriverTools.java:142)
      at org.apache.jsp.soapReply$jsp._jspService(soapReply$jsp.java:199)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
      at org.mortbay.http.HttpServer.service(HttpServer.java:863)
      at org.jboss.jetty.Jetty.service(Jetty.java:460)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
      16:51:05,942 WARN [jbossweb] WARNING: Exception for /SoapDriverEJB/soapReply.jsp: org.xml.sax.SAXException: Deserializing parameter 'SoapToMessageDispatcherReturn': could not find deserializer for type MessageResponse