0 Replies Latest reply on Dec 20, 2004 4:22 AM by Harshinie Dayaratne

    Urgent :No serializer found for class : passing non standard

    Harshinie Dayaratne Newbie

      In my application i have converted a session ejb to a webservice. service works ok. i have generated the web service.xml using following xdoclet commands.

      jboss-net.web-service urn="testService"

      follwoing is the web service method signature

      /**
      * write entry method which writes a log entry
      *
      * @ejb.interface-method view-type = "both"
      * @throws EJBException Thrown if the instance could not perform
      * @jboss-net.web-method returnQName="ErrorStatus"
      * the function requested by the container because of an system-level error.
      */
      public String addOrder(Order orderobj) throws EJBException {

      Order is a user define class which has order name, date generated and package vector which describes the packeges for a order.

      follwoing is the web service xml file generated.

      <?xml version="1.0" encoding="UTF-8"?>

      <!-- -->
      <!-- This JBoss.Net Web Service Descriptor has been generated by XDoclet -->
      <!-- and is brought to you by F. M. Brier, C. G. Jung and J. Essington -->
      <!-- -->

      <deployment
      name="testService"
      xmlns="http://xml.apache.org/axis/wsdd/"
      targetNamespace="http://localhost:8080/testService"
      xmlns:test="http://localhost:8080/testService"
      xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

      <!-- The following are declarations of service endpoints targetted to
      session beans -->











      <!-- Operation mapping results -->







      <!-- The following are typemappings for entity beans for implementing
      the implicit web-service value-object pattern -->

      <!-- The following are typemappings for bean-type value-objects -->

      <!-- There follow merged custom web service descriptions -->





      then i create a wsdl file and deploy the web service in jboss
      when i call the webservice through web browser the wsdl file displays ok.
      but when i call the webservice from a client program i got follwoing error

      AxisFault
      faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
      faultSubcode:
      faultString: java.io.IOException: No serializer found for class com.test.obj.Order in registry org.apache.axis.encoding.TypeMappingImpl@ec6b00
      faultActor:
      faultNode:
      faultDetail:
      {http://xml.apache.org/axis/}stackTrace: java.io.IOException: No serializer found for class com.test.obj.Order in registry org.apache.axis.encoding.TypeMappingImpl@ec6b00
      at org.apache.axis.encoding.SerializationContextImpl.serializeActual(SerializationContextImpl.java:1281)
      at org.apache.axis.encoding.SerializationContextImpl.serialize(SerializationContextImpl.java:795)
      at org.apache.axis.encoding.SerializationContextImpl.outputMultiRefs(SerializationContextImpl.java:866)
      at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:179)
      at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:509)
      at org.apache.axis.message.MessageElement.output(MessageElement.java:783)
      at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:270)
      at org.apache.axis.SOAPPart.getAsString(SOAPPart.java:483)
      at org.apache.axis.SOAPPart.getAsBytes(SOAPPart.java:375)
      at org.apache.axis.Message.getContentType(Message.java:399)
      at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:341)
      at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:122)
      at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
      at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
      at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
      at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
      at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
      at org.apache.axis.client.Call.invoke(Call.java:2553)
      at org.apache.axis.client.Call.invoke(Call.java:2248)
      at org.apache.axis.client.Call.invoke(Call.java:2171)
      at org.apache.axis.client.Call.invoke(Call.java:1691)
      at com.test.client.testServiceClient.main(testServiceClient.java:58)


      java.io.IOException: No serializer found for class com.test.obj.Order in registry org.apache.axis.encoding.TypeMappingImpl@ec6b00
      at org.apache.axis.AxisFault.makeFault(AxisFault.java:129)
      at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:272)
      at org.apache.axis.SOAPPart.getAsString(SOAPPart.java:483)
      at org.apache.axis.SOAPPart.getAsBytes(SOAPPart.java:375)
      at org.apache.axis.Message.getContentType(Message.java:399)
      at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:341)
      at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:122)
      at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
      at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
      at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
      at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
      at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
      at org.apache.axis.client.Call.invoke(Call.java:2553)
      at org.apache.axis.client.Call.invoke(Call.java:2248)
      at org.apache.axis.client.Call.invoke(Call.java:2171)
      at org.apache.axis.client.Call.invoke(Call.java:1691)
      at com.test.client.testServiceClient.main(testServiceClient.java:58)
      Caused by: java.io.IOException: No serializer found for class com.test.obj.Order in registry org.apache.axis.encoding.TypeMappingImpl@ec6b00
      at org.apache.axis.encoding.SerializationContextImpl.serializeActual(SerializationContextImpl.java:1281)
      at org.apache.axis.encoding.SerializationContextImpl.serialize(SerializationContextImpl.java:795)
      at org.apache.axis.encoding.SerializationContextImpl.outputMultiRefs(SerializationContextImpl.java:866)
      at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:179)
      at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:509)
      at org.apache.axis.message.MessageElement.output(MessageElement


      could you please what is the cause of this error and how can i solve this.

      if i want to pass an non standard object as above to a webservice call as a parameter how shall i do that.

      please help me
      thanks in advance