Announcement Announcement Module
Collapse
No announcement yet.
Complext Datatype in Spring WebService Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Complext Datatype in Spring WebService

    Hi,

    I am using spring web service for my project. I have web service that returns me one class object. But at run time i am getting following exception. Can any one give me sample application, how i can get complex data type using web service. I can get simple data from web service. But can not get object from web service.


    - Exception:
    org.xml.sax.SAXException: Deserializing parameter 'result': could not find deserializer for type {urn:localhost/types/interface}Sample
    at org.apache.axis.message.RPCHandler.onStartChild(RP CHandler.java:277)
    at org.apache.axis.encoding.DeserializationContext.st artElement(DeserializationContext.java:1035)
    at org.apache.axis.message.SAX2EventRecorder.replay(S AX2EventRecorder.java:165)
    at org.apache.axis.message.MessageElement.publishToHa ndler(MessageElement.java:1141)
    at org.apache.axis.message.RPCElement.deserialize(RPC Element.java:236)
    at org.apache.axis.message.RPCElement.getParams(RPCEl ement.java:384)
    at org.apache.axis.client.Call.invoke(Call.java:2467)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at org.springframework.remoting.jaxrpc.JaxRpcPortClie ntInterceptor.performJaxRpcCall(JaxRpcPortClientIn terceptor.java:680)
    at org.springframework.remoting.jaxrpc.JaxRpcPortClie ntInterceptor.performJaxRpcCall(JaxRpcPortClientIn terceptor.java:643)
    at org.springframework.remoting.jaxrpc.JaxRpcPortClie ntInterceptor.doInvoke(JaxRpcPortClientInterceptor .java:599)
    at org.springframework.remoting.jaxrpc.JaxRpcPortClie ntInterceptor.invoke(JaxRpcPortClientInterceptor.j ava:571)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)
    at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:204)

  • #2
    This is most likely a client side issue. You are using Axis (not spring ws) for your client. Did you generate your client using wsdl2java or are you making JAXRPC calls directly? Either way I'd suggest you use spring ws on the client side. You can find examples of how do this in the samples area of the spring ws distribution.

    spring-ws-1.5.0/samples/airline/client/spring-ws has a good example if you like to use generated classes for the request/response classes although it includes security which you may not need. spring-ws-1.5.0/samples/stockquote/client/spring-ws shows a simpler example where you are just pushing XML directly to the server.

    The Reference Guide also has good information on writing spring ws clients.

    Comment


    • #3
      Originally posted by ibutcher View Post
      This is most likely a client side issue. You are using Axis (not spring ws) for your client. Did you generate your client using wsdl2java or are you making JAXRPC calls directly? Either way I'd suggest you use spring ws on the client side. You can find examples of how do this in the samples area of the spring ws distribution.

      spring-ws-1.5.0/samples/airline/client/spring-ws has a good example if you like to use generated classes for the request/response classes although it includes security which you may not need. spring-ws-1.5.0/samples/stockquote/client/spring-ws shows a simpler example where you are just pushing XML directly to the server.

      The Reference Guide also has good information on writing spring ws clients.
      Hi ibutcher,

      Thank you for your reply.

      Actually I am using JAX-RPC in Spring to call web service.

      I have not specified "servicePostProcessors" in my spring.xml file.

      Now it is working fine for me.

      Thanks,
      Bipin

      Comment

      Working...
      X