This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

My return type from the web service call is a simple value object with a String member variable. I was under the impression that I should not have to specify a custom deserializer for such a simple value object.

I have connected directly to the web service using stubs I generated using wsdl2java, so I know there's nothing wrong with the web service.

I think you need to register any custom type, even if it's really simple.

I'm currently trying to access a SOAP service as is shown in chapter 16 of Pro Spring, and I'm also running into "could not find deserializer for type" error messages - even though I did do everything by the book.

Comment

I was able to fix the problem I was having earlier on in the post.
This is what I did.
This is my clientContext.xml file ... much like the clientContext.xml file in the JPetStore example.

Code:

<bean id="jaxRpcProxy" class="*** create a class which extends org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean***">
<property name="serviceInterface">
<value>***put the class name corresponding to your service interface in here***</value>
</property>
<property name="portInterface">
<value>***put the class name corresponding to your port interface in here &#40;this should throw a remote exception&#41;***</value>
</property>
<property name="serviceFactoryClass">
<value>org.apache.axis.client.ServiceFactory</value>
</property>
<property name="wsdlDocumentUrl">
<value>*** put the location of your wsdl file in here***</value>
</property>
<property name="namespaceUri">
<value>*** namespace for the wsdl goes in here***</value>
</property>
<property name="serviceName">
<value>*** name of the service you are trying to connect to goes in here***</value>
</property>
<property name="portName">
<value>*** The port name in your wsdl file goes in here***</value>
</property>
<property name="endpointAddress">
<value>*** The endpoint address goes in here***</value>
</property>
</bean>

I had left out the endpointAddress property and I think this is what led to my original error.

The class that you create which extends org.springframework.remoting.jaxrpc.JaxRpcPortProx yFactoryBean should look like AxisPortProxyFactoryBean in the JPetStore example. Its probably a good idea to register all classes which you are serializing and deserializing in this code.

Hope this clears up issues for anyone who was having the same problem as I was.