Greetings.
I've just spent several hours trying to solve the problem with not being able to deserialize an XML response on the client side.
I successfully deployed an Axis service, and am able to invoke findSchoolByName method, which returns a valid XML message (I intercepted and verified it using TCPMonitor). However, the client throws the following error:
org.xml.sax.SAXException: Deserializing parameter 'findSchoolByNameReturn': could not find deserializer for type {urn:dss.sww.com}School
I followed the JPetStore example from Spring 1.2RC1. My client bean is declared as follows:
<bean id="jaxRpcProxy" class="org.springframework.remoting.jaxrpc.JaxRpcP ortProxyFactoryBean">
I also registered BeanMappingServicePostProcessor class, which implements JaxRpcServicePostProcessor, as the "servicePostProcessors" property of the client bean the same way it was done in JPetStore. The BeanMappingServicePostProcessor does kick in and register the type mappings, which can be seen from the stack trace at the end of this message.
Please help me!
Here is the XML response from the Axis service:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<findSchoolByNameResponse xmlns="urn:dss.sww.com">
<findSchoolByNameReturn>
<name>Shkola</name>
</findSchoolByNameReturn>
</findSchoolByNameResponse>
</soapenv:Body>
</soapenv:Envelope>
Below is the pertinent stack trace:
Registered bean mapping for XMLType {urn:dss.sww.com}AModel with class com.sww.dss.domain.model.hibernate.AModel
Registered bean mapping for XMLType {urn:dss.sww.com}School with class com.sww.dss.domain.model.hibernate.School
2005-04-14 20:44:34,078: org.springframework.remoting.jaxrpc.JaxRpcPortProx yFactoryBean,INFO,: Using JAX-RPC dynamic calls for JAX-RPC port [{urn:dss.sww.com}SchoolService]
2005-04-14 20:44:34,250: org.springframework.aop.framework.DefaultAopProxyF actory,INFO,: CGLIB2 available: proxyTargetClass feature enabled
Calling SchoolService 'jaxRpcProxy' with school name Shkola
Using SchoolService: JAX-RPC proxy for port [SchoolService] of service [{urn:dss.sww.com}JaxRpcSchoolServiceService]
2005-04-14 20:44:34,734: org.apache.axis.client.Call,ERROR,: Exception:
org.xml.sax.SAXException: Deserializing parameter 'findSchoolByNameReturn': could not find deserializer for type {urn:dss.sww.com}School
at org.apache.axis.message.RPCHandler.onStartChild(RP CHandler.java:273)
at org.apache.axis.encoding.DeserializationContext.st artElement(DeserializationContext.java:1031)
at org.apache.axis.message.SAX2EventRecorder.replay(S AX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHa ndler(MessageElement.java:1140)
at org.apache.axis.message.RPCElement.deserialize(RPC Element.java:238)
at org.apache.axis.message.RPCElement.getParams(RPCEl ement.java:386)
at org.apache.axis.client.Call.invoke(Call.java:2402)
at org.apache.axis.client.Call.invoke(Call.java:2301)
at org.apache.axis.client.Call.invoke(Call.java:1758)
at org.springframework.remoting.jaxrpc.JaxRpcPortClie ntInterceptor.performJaxRpcCall(JaxRpcPortClientIn terceptor.java:492)
at org.springframework.remoting.jaxrpc.JaxRpcPortClie ntInterceptor.invoke(JaxRpcPortClientInterceptor.j ava:451)
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :144)
at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:174)
at $Proxy0.findSchoolByName(Unknown Source)
at com.sww.dss.service.client.SchoolServiceClient.inv okeSchoolServices(SchoolServiceClient.java:46)
at com.sww.dss.service.client.SchoolServiceClient.mai n(SchoolServiceClient.java:74)


Reply With Quote