Ok, i was pretty sure I tried that but I tried again anyhow and still get the same results. I created a concrete Person class and through the binding class just instanced and filled the values and returned it. Again, in TCPMonitor I can see the correct information but still end up recieving the same error.
What I would ideally like is for the service to return the correct type by using my original interface as opposed to having to create additional wrappers for each class I need to use in the service. Is that possible? Our eventual goal is to have these services used by a .NET client also. Thanks. KJQ -----Original Message----- From: Vidyanand Murunikkara To: [EMAIL PROTECTED] Sent: 12/14/02 2:36 AM Subject: RE: Problems with Deserialization Could you try with a real implementain class on the client side . Just mock up a class on the client side that represents person and try to deserialize the respone to it. If it fails try using the beanserializer and beandeserializer factories from axis with the mocked up class. This way you would be able to pinpoint whats going wrong and where. Vidyanand. -----Original Message----- From: Quinn, Kim John Sent: Fri 12/13/2002 10:00 PM To: '[EMAIL PROTECTED]' Cc: Subject: RE: Problems with Deserialization Yeah, that still fails with it on... I just cant figure out why I cant seem to get this down on the client, plus I would like to be able to receive it as its actual type - which in this case is "Person" (interface). We use dynamicProxys for the actual class so I dont really have a real implementation. Its a HashMap wrapped with the interface. Thanks for the reponse. KJQ -----Original Message----- From: Vidyanand Murunikkara To: [EMAIL PROTECTED] Sent: 12/14/02 12:18 AM Subject: RE: Problems with Deserialization Hi Is there are a reason why you have commented out the call to client.registerTypeMapping in your client program . This surely will fail since there is no deserializerfactory registered for Person. Can you run the code with the typemapping registered. You could also set the return type to be of type Person instead of anytype. Vidyanand -----Original Message----- From: Quinn, Kim John Sent: Fri 12/13/2002 8:50 PM To: '[EMAIL PROTECTED]' Cc: Subject: Problems with Deserialization Hello all, I am having a super frustrating problem with deserializing an object in Axis. It says it cannot find the "deserializer for {xxx}YYY". I can see in the TCPMonitor though that it seems to be working correctly. I have a custom serializer and deserializer that I am using. I have tried scouring the newsgroups and saw a lot on the topic but I couldnt seem to find anything that helped me. Everything seems to be working fine till i get to the client... Here is my error: --------------------------------- org.xml.sax.SAXException: Deserializing parameter 'createPersonReturn': could not find deserializer for type {PersonWorkflowService}Person at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:264) at org.apache.axis.encoding.DeserializationContextImpl.startElement(Deseria liza tionContextIm pl.java:883) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java: 158) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.j ava: 681) at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:244) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:268) at org.apache.axis.client.Call.invoke(Call.java:1862) at org.apache.axis.client.Call.invoke(Call.java:1768) at org.apache.axis.client.Call.invoke(Call.java:1306) at test.testwf.TestWfWs.testPerson(TestWfWs.java:61) at test.testwf.TestWfWs.main(TestWfWs.java:87) Exception in thread "main" AxisFault faultCode: { http://xml.apache.org/axis/ <http://xml.apache.org/axis/> < http://xml.apache.org/axis/ <http://xml.apache.org/axis/> > }Server.userException faultString: org.xml.sax.SAXException: Deserializing parameter 'createPersonReturn': could not fin d deserializer for type {PersonWorkflowService}Person faultActor: null faultDetail: stackTrace: org.xml.sax.SAXException: Deserializing parameter 'createPersonReturn': could n ot find deserializer for type {PersonWorkflowService}Person at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:264) at org.apache.axis.encoding.DeserializationContextImpl.startElement(Deseria liza tionContextIm pl.java:883) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java: 158) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.j ava: 681) at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:244) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:268) at org.apache.axis.client.Call.invoke(Call.java:1862) at org.apache.axis.client.Call.invoke(Call.java:1768) at org.apache.axis.client.Call.invoke(Call.java:1306) at test.testwf.TestWfWs.testPerson(TestWfWs.java:61) at test.testwf.TestWfWs.main(TestWfWs.java:87) org.xml.sax.SAXException: Deserializing parameter 'createPersonReturn': could not find deserializer for type {PersonWorkflowService}Person at org.apache.axis.AxisFault.makeFault(AxisFault.java:115) at org.apache.axis.client.Call.invoke(Call.java:1865) at org.apache.axis.client.Call.invoke(Call.java:1768) at org.apache.axis.client.Call.invoke(Call.java:1306) at test.testwf.TestWfWs.testPerson(TestWfWs.java:61) at test.testwf.TestWfWs.main(TestWfWs.java:87) Caused by: org.xml.sax.SAXException: Deserializing parameter 'createPersonReturn': could not find d eserializer for type {PersonWorkflowService}Person at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:264) at org.apache.axis.encoding.DeserializationContextImpl.startElement(Deseria liza tionContextIm pl.java:883) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java: 158) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.j ava: 681) at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:244) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:268) at org.apache.axis.client.Call.invoke(Call.java:1862) ... 4 more Here is my deploy.wsdd --------------------------------- <deployment xmlns=" http://xml.apache.org/axis/wsdd/ <http://xml.apache.org/axis/wsdd/> < http://xml.apache.org/axis/wsdd/ <http://xml.apache.org/axis/wsdd/> > " xmlns:java=" http://xml.apache.org/axis/wsdd/providers/java <http://xml.apache.org/axis/wsdd/providers/java> < http://xml.apache.org/axis/wsdd/providers/java <http://xml.apache.org/axis/wsdd/providers/java> > "> <!-- Services from PersonWorkflowService WSDL service --> <service name="PersonWorkflowService" provider="java:RPC"> <parameter name="wsdlTargetNamespace" value="urn:PersonWorkflowService"/> <parameter name="wsdlServiceElement" value="PersonWorkflowService"/> <parameter name="wsdlServicePort" value="PersonWorkflowService"/> <parameter name="className" value="com.x2.blocks.person.webservice.PersonWorkflowServiceSoapBindingS kele ton"/> <parameter name="wsdlPortType" value="PersonWorkflowPort"/> <parameter name="allowedMethods" value="*"/> <parameter name="scope" value="Request"/> <typeMapping qname="MyNS:Person" xmlns:MyNS="PersonWorkflowService" languageSpecificType="java:com.x2.blocks.person.Person" serializer="com.x2.ext.axis.PersistableSerializerFactory" deserializer="com.x2.ext.axis.PersistableDeserializerFactory" encodingStype=" http://schema.xmlsoap.org/soap/encoding/ <http://schema.xmlsoap.org/soap/encoding/> < http://schema.xmlsoap.org/soap/encoding/ <http://schema.xmlsoap.org/soap/encoding/> > " /> </service> </deployment> Here is my WSDL file: ---------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions targetNamespace="urn:PersonWorkflowService" xmlns:soapenc=" http://schemas.xmlsoap.org/soap/encoding/ <http://schemas.xmlsoap.org/soap/encoding/> < http://schemas.xmlsoap.org/soap/encoding/ <http://schemas.xmlsoap.org/soap/encoding/> > " xmlns:wsdlsoap=" http://schemas.xmlsoap.org/wsdl/soap/ <http://schemas.xmlsoap.org/wsdl/soap/> < http://schemas.xmlsoap.org/wsdl/soap/ <http://schemas.xmlsoap.org/wsdl/soap/> > " xmlns:tns2=" http://person.blocks.x2.com <http://person.blocks.x2.com> < http://person.blocks.x2.com <http://person.blocks.x2.com> > " xmlns:typens="urn:PersonWorkflowService" xmlns:apachesoap=" http://xml.apache.org/xml-soap <http://xml.apache.org/xml-soap> < http://xml.apache.org/xml-soap <http://xml.apache.org/xml-soap> > " xmlns:xsd=" http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> < http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> > " xmlns:intf="urn:PersonWorkflowService" xmlns:wsdl=" http://schemas.xmlsoap.org/wsdl/ <http://schemas.xmlsoap.org/wsdl/> < http://schemas.xmlsoap.org/wsdl/ <http://schemas.xmlsoap.org/wsdl/> > " xmlns:impl="urn:PersonWorkflowService" xmlns=" http://schemas.xmlsoap.org/wsdl/ <http://schemas.xmlsoap.org/wsdl/> < http://schemas.xmlsoap.org/wsdl/ <http://schemas.xmlsoap.org/wsdl/> > "> <wsdl:types/> <!-- <types> <xsd:schema targetNamespace="urn:PersonWorkflowService" xmlns:xsd=" http://www.w3.org/1999/XMLSchema <http://www.w3.org/1999/XMLSchema> < http://www.w3.org/1999/XMLSchema <http://www.w3.org/1999/XMLSchema> > "> <xsd:complexType name="Person"> <xsd:all> <xsd:element name="PersonID" type="xsd:int"/> <xsd:element name="FirstName" type="xsd:string"/> <xsd:element name="LastName" type="xsd:string"/> </xsd:all> </xsd:complexType> </xsd:schema> </types> --> <wsdl:message name="testResponse"> <wsdl:part name="testReturn" type="xsd:string"/> </wsdl:message> <wsdl:message name="createPersonResponse"> <wsdl:part name="createPersonReturn" type="xsd:anyType"/> </wsdl:message> <wsdl:message name="createPersonRequest"> </wsdl:message> <wsdl:message name="testRequest"> </wsdl:message> <wsdl:portType name="PersonWorkflowPort"> <wsdl:operation name="test"> <wsdl:input name="testRequest" message="intf:testRequest"/> <wsdl:output name="testResponse" message="intf:testResponse"/> </wsdl:operation> <wsdl:operation name="createPerson"> <wsdl:input name="createPersonRequest" message="intf:createPersonRequest"/> <wsdl:output name="createPersonResponse" message="intf:createPersonResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="PersonWorkflowServiceSoapBinding" type="intf:PersonWorkflowPort"> <wsdlsoap:binding style="rpc" transport=" http://schemas.xmlsoap.org/soap/http <http://schemas.xmlsoap.org/soap/http> < http://schemas.xmlsoap.org/soap/http <http://schemas.xmlsoap.org/soap/http> > "/> <wsdl:operation name="test"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="testRequest"> <wsdlsoap:body use="encoded" encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/ <http://schemas.xmlsoap.org/soap/encoding/> < http://schemas.xmlsoap.org/soap/encoding/ <http://schemas.xmlsoap.org/soap/encoding/> > " namespace="urn:PersonWorkflowService"/> </wsdl:input> <wsdl:output name="testResponse"> <wsdlsoap:body use="encoded" encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/ <http://schemas.xmlsoap.org/soap/encoding/> < http://schemas.xmlsoap.org/soap/encoding/ <http://schemas.xmlsoap.org/soap/encoding/> > " namespace="urn:PersonWorkflowService"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="createPerson"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="createPersonRequest"> <wsdlsoap:body use="encoded" encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/ <http://schemas.xmlsoap.org/soap/encoding/> < http://schemas.xmlsoap.org/soap/encoding/ <http://schemas.xmlsoap.org/soap/encoding/> > " namespace="urn:PersonWorkflowService"/> </wsdl:input> <wsdl:output name="createPersonResponse"> <wsdlsoap:body use="encoded" encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/ <http://schemas.xmlsoap.org/soap/encoding/> < http://schemas.xmlsoap.org/soap/encoding/ <http://schemas.xmlsoap.org/soap/encoding/> > " namespace="urn:PersonWorkflowService"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="PersonWorkflowService"> <wsdl:port name="PersonWorkflowService" binding="intf:PersonWorkflowServiceSoapBinding"> <wsdlsoap:address location=" http://localhost:8080/axis/services/PersonWorkflowService <http://localhost:8080/axis/services/PersonWorkflowService> < http://localhost:8080/axis/services/PersonWorkflowService <http://localhost:8080/axis/services/PersonWorkflowService> > "/> </wsdl:port> </wsdl:service> </wsdl:definitions> Here is my TCPMonitor Report: ------------------------------------------ Listen Port: 8070 Target Host: localhost Target Port: 8080 ==== Request ==== POST /axis/services/PersonWorkflowService HTTP/1.0 Content-Type: text/xml; charset=utf-8 Accept: application/soap+xml, application/dime, multipart/related, text/* User-Agent: Axis/beta3 Host: localhost Cache-Control: no-cache Pragma: no-cache SOAPAction: "" Content-Length: 389 <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> < http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> > " xmlns:xsd=" http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> < http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> > " xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> < http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> > "> <soapenv:Body> <ns1:createPerson soapenv:encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/ <http://schemas.xmlsoap.org/soap/encoding/> < http://schemas.xmlsoap.org/soap/encoding/ <http://schemas.xmlsoap.org/soap/encoding/> > " xmlns:ns1="PersonWorkflowService"/> </soapenv:Body> </soapenv:Envelope>==== Response ==== HTTP/1.1 200 OK Date: Sat, 14 Dec 2002 04:50:48 GMT Server: Jetty/4.1.0 (Windows 2000 5.0 x86) Servlet-Engine: Jetty/4.1.0 (Servlet 2.3; JSP 1.2; java 1.4.0) Content-Type: text/xml; charset=utf-8 <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> < http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> > " xmlns:xsd=" http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> < http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> > " xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> < http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance> > "> <soapenv:Body> <ns1:createPersonResponse soapenv:encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/ <http://schemas.xmlsoap.org/soap/encoding/> < http://schemas.xmlsoap.org/soap/encoding/ <http://schemas.xmlsoap.org/soap/encoding/> > " xmlns:ns1="PersonWorkflowService"> <createPersonReturn href="#id0"/> </ns1:createPersonResponse> <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/ <http://schemas.xmlsoap.org/soap/encoding/> < http://schemas.xmlsoap.org/soap/encoding/ <http://schemas.xmlsoap.org/soap/encoding/> > " xsi:type="ns2:Person" xmlns:soapenc=" http://schemas.xmlsoap.org/soap/encoding/ <http://schemas.xmlsoap.org/soap/encoding/> < http://schemas.xmlsoap.org/soap/encoding/ <http://schemas.xmlsoap.org/soap/encoding/> > " xmlns:ns2="PersonWorkflowService"> <PersonID xsi:type="xsd:int">1177</PersonID> <FisrtName xsi:type="xsd:string">Super</FisrtName> <LastName xsi:type="xsd:string">Man</LastName> </multiRef> </soapenv:Body> </soapenv:Envelope> Here is my test: --------------------------------------------- public void testPerson() throws Exception { String endpoint = " http://localhost:8070/axis/services/PersonWorkflowService <http://localhost:8070/axis/services/PersonWorkflowService> < http://localhost:8070/axis/services/PersonWorkflowService <http://localhost:8070/axis/services/PersonWorkflowService> > "; Service srvc = new Service(); Call call = (Call)srvc.createCall(); call.setTargetEndpointAddress ( new java.net.URL(endpoint) ); call.setOperationName ( new QName("PersonWorkflowService", "createPerson") ); /* QName qname = new QName("PersonWorkflowService", "Person"); Class clz = com.x2.blocks.person.Person.class; call.registerTypeMapping(clz, qname, com.x2.ext.axis.PersistableSerializerFactory.class, com.x2.ext.axis.PersistableDeserializerFactory.class); call.setReturnType(XMLType.XSD_ANYTYPE); */ Person p = (Person)call.invoke( new Object[] {} ); System.out.println("Person: " + p.getPersonID() + " = " + p.getFirstName() + ", " + p.getLastName() + "\n"); } Gad, any help or tips or suggestions would be really appreciated, I've been banging my head against the wall on this one for some time now... Thanks. KJQ [EMAIL PROTECTED]