0 Replies Latest reply on Jun 14, 2006 7:02 AM by hferreira

    No serializer found Problem

      Hi

      I made a web service client but I face a problem. When I try to access to methods that pass complex types I receive the following exception:

      java.io.IOException: No serializer found for class com.myrio.tm.connectors.types.srvcProv.CMessageDTO in registry org.jboss.axis.encoding.TypeMappingImpl@1ed1b0b
      at org.jboss.axis.encoding.SerializationContextImpl.serializeActual(SerializationContextImpl.java:1484)
      at org.jboss.axis.encoding.SerializationContextImpl.serialize(SerializationContextImpl.java:892)
      at org.jboss.axis.message.RPCParam.serialize(RPCParam.java:265)
      at org.jboss.axis.message.RPCElement.outputImpl(RPCElement.java:445)
      at org.jboss.axis.message.SOAPElementAxisImpl.output(SOAPElementAxisImpl.java:1452)
      at org.jboss.axis.message.SOAPBodyAxisImpl.outputImpl(SOAPBodyAxisImpl.java:157)
      at org.jboss.axis.message.SOAPEnvelopeAxisImpl.outputImpl(SOAPEnvelopeAxisImpl.java:588)
      at org.jboss.axis.message.SOAPElementAxisImpl.output(SOAPElementAxisImpl.java:1452)
      at org.jboss.axis.MessagePart.writeTo(MessagePart.java:299)
      at org.jboss.axis.MessagePart.getAsString(MessagePart.java:591)
      at org.jboss.axis.MessagePart.getAsBytes(MessagePart.java:447)
      at org.jboss.axis.Message.getContentType(Message.java:471)
      at org.jboss.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:385)
      at org.jboss.axis.transport.http.HTTPSender.invoke(HTTPSender.java:131)
      at org.jboss.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73)
      at org.jboss.axis.SimpleChain.doVisiting(SimpleChain.java:160)
      at org.jboss.axis.SimpleChain.invoke(SimpleChain.java:123)
      at org.jboss.webservice.client.ClientEngine.invoke(ClientEngine.java:128)
      at org.jboss.axis.client.Call.invokeEngine(Call.java:3079)Fim

      at org.jboss.axis.client.Call.invoke(Call.java:3064)
      at org.jboss.axis.client.Call.invoke(Call.java:2652)
      at org.jboss.axis.client.Call.invoke(Call.java:2561)
      at org.jboss.axis.client.Call.invokeInternal(Call.java:1982)
      at org.jboss.axis.client.Call.invoke(Call.java:1920)
      at org.jboss.webservice.client.CallImpl.invoke(CallImpl.java:265)
      at org.jboss.axis.client.AxisClientProxy.invokeSEIMethod(AxisClientProxy.java:286)
      at org.jboss.webservice.client.PortProxy.invoke(PortProxy.java:177)
      ... 3 more

      My war file contains the CMessageDTO and the jaxrpc-mapping.xml file is filled correctly.

      The client is coded like this:


      // Specify the location of the WSDL file
      URL url = new URL("http://localhost:8080/srvcProvservers/ServiceProvider?wsdl");

      // Create an instance of service factory
      ServiceFactory serviceFactory = ServiceFactory.newInstance();

      // Create a service object to act as a factory for proxies.
      Service bsrService = serviceFactory.createService(url,
      new QName(nameSpaceUri, serviceName));

      // Create a proxy
      IServiceProvider
      myProxy = (IServiceProvider) bsrService.getPort(
      new QName(nameSpaceUri,portName), IServiceProvider.class);


      // myProxy.methodA(1,"asd");

      CMessageDTO msg = new CMessageDTO();
      msg.setMsgContent("duh");
      myProxy.notifyMessage(msg);


      Can anyone tell me how to fix it?
      Thanks in advance