axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pascal RECCHIA <pascal_recc...@yahoo.fr>
Subject Type Register Mapping Problem
Date Fri, 26 Jul 2002 10:16:31 GMT

Of course, My code was :

 javax.xml.rpc.encoding.TypeMapping tm1 = tmri.createTypeMapping();
   tm1.register( InfoCustomer.class, qname, new BeanSerializerFactory(
InfoCustomer.class, qname ), new BeanDeserializerFactory( InfoCustomer.class, qname ) );
   tmri.register("urn:InfoCustomer",tm1);


 

 

Hi,

I don't manage to solve this problem :

org.xml.sax.SAXException: Deserializing parameter 'getInfoCustomerReturn':
could not find deserializer for type {urn:InfoCustomer}ICTR
at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:231)
at
org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:857)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:199)
at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:644)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:235)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:259)
at com.devoteam.orange.bean.ClientBean.getDetails(ClientBean.java:230)
at com.devoteam.orange.servlet.ClientControler.doGet(ClientControler.java:29)
at com.devoteam.orange.servlet.ClientControler.doPost(ClientControler.java:15)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167)
at
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
at
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
at
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
at
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:523)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:282)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:112)
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:91)
at
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:184)
at
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
at
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
at
com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)



In fact, I must rebuild my SOAPEnvelope on my client, because I implement XML
Encryption for the SOAP messages and I want to use after decrypt the AXIS
deserializer ...

My code :

MessageContext msgContext = null;
   AxisClient tmpEngine = new AxisClient(new NullProvider());
   msgContext = new MessageContext(tmpEngine);

//    msgContext = MessageContext.getCurrentContext();


   TypeMappingRegistryImpl tmri =  new TypeMappingRegistryImpl();
//    TypeMappingRegistry tmri = msgContext.getTypeMappingRegistry();

   javax.xml.rpc.encoding.TypeMapping tm1 = tmri.createTypeMapping();
   tm1.register( Customer.class, qname, new BeanSerializerFactory(
Customer.class, qname ), new BeanDeserializerFactory( Customer.class, qname ) );
   tmri.register("urn:Customer",tm1);

   msgContext.setTypeMappingRegistry(tmri);

   SOAPEnvelope env = new SOAPEnvelope();

   Message message = new Message(env);

   msgContext.setResponseMessage(message);


   StringWriter writer = new StringWriter();
         SerializationContext serializeContext = new
SerializationContextImpl(writer, null);
     respEnv.output(serializeContext);
        writer.close();
         Reader reader = new StringReader(writer.getBuffer().toString());

   InputSource is = new InputSource(reader);

   DeserializationContextImpl dser = null;
   dser = new DeserializationContextImpl(is, msgContext, Message.RESPONSE, env);
   dser.parse();

     RPCElement respRPC = (RPCElement)env.getFirstBody();
  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 respRPC.getParams(); This code line trhows
exception ...



Thanks




---------------------------------
Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en fran├žais !

Mime
View raw message