Announcement Announcement Module
Collapse
No announcement yet.
Sending a user defined object with JAXRPC?? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sending a user defined object with JAXRPC??

    Hi I am trying to invoke a JAXRPC service which accepts a User Defined Object using the Spring JAXRPC client. It works great for standard types but breaks with a user defined type. Does anybody have any ideas?
    Below is the exception raised....


    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.io.IOException: No serializer found for class za.co.rmb.dv.webservice.NewTradeDTO in registry org.apache.axis.encoding.TypeMappingImpl@7109c4
    faultActor:
    faultNode:
    faultDetail:
    {http://xml.apache.org/axis/}stackTrace:java.io.IOException: No serializer found for class za.co.rmb.dv.webservice.NewTradeDTO in registry org.apache.axis.encoding.TypeMappingImpl@7109c4
    at org.apache.axis.encoding.SerializationContext.seri alizeActual(SerializationContext.java:1372)
    at org.apache.axis.encoding.SerializationContext.seri alize(SerializationContext.java:880)
    at org.apache.axis.encoding.SerializationContext.outp utMultiRefs(SerializationContext.java:954)
    at org.apache.axis.message.SOAPBody.outputImpl(SOAPBo dy.java:145)
    at org.apache.axis.message.SOAPEnvelope.outputImpl(SO APEnvelope.java:484)
    at org.apache.axis.message.MessageElement.output(Mess ageElement.java:1207)
    at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:297 )
    at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:271 )
    at org.apache.axis.SOAPPart.saveChanges(SOAPPart.java :482)
    at org.apache.axis.attachments.AttachmentsImpl.getAtt achmentCount(AttachmentsImpl.java:519)
    at org.apache.axis.Message.getContentType(Message.jav a:475)
    at org.apache.axis.transport.http.HTTPSender.writeToS ocket(HTTPSender.java:291)
    at org.apache.axis.transport.http.HTTPSender.invoke(H TTPSender.java:88)
    at org.apache.axis.strategies.InvocationStrategy.visi t(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain .java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.jav a:83)
    at org.apache.axis.client.AxisClient.invoke(AxisClien t.java:147)
    at org.apache.axis.client.Call.invokeEngine(Call.java :2719)
    at org.apache.axis.client.Call.invoke(Call.java:2702)
    at org.apache.axis.client.Call.invoke(Call.java:2378)
    at org.apache.axis.client.Call.invoke(Call.java:2301)
    at org.apache.axis.client.Call.invoke(Call.java:1758)
    at org.apache.axis.client.AxisClientProxy.invoke(Axis ClientProxy.java:163)
    at $Proxy0.submitTrade(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.springframework.remoting.rmi.RmiClientIntercep torUtils.doInvoke(RmiClientInterceptorUtils.java:9 8)
    at org.springframework.remoting.rmi.RmiClientIntercep torUtils.invoke(RmiClientInterceptorUtils.java:67)
    at org.springframework.remoting.jaxrpc.JaxRpcPortClie ntInterceptor.invoke(JaxRpcPortClientInterceptor.j ava:341)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :143)
    at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:174)
    at $Proxy1.submitTrade(Unknown Source)
    at za.co.rmb.spj.deals.session.DealViewWSClient.fireO ffNewTrade(DealViewWSClient.java:49)
    at za.co.rmb.spj.deals.session.DealViewWSClient.main( DealViewWSClient.java:78)

  • #2
    Axis cannot deal with user defined objects without a declared serializer in your wsdd service description.

    http://ws.apache.org/axis/java/user-...ml#DataMapping
    Good stuff there

    Strings, bools, ints and the like are fine, but user defined stuff requires serializers. If you working with a bean, the beanMapping is the way to go.

    Comment


    • #3
      Thanks.
      I found an example in the petstore example. Got it working.

      Comment

      Working...
      X