Loading ...
Sorry, an error occurred while loading the content.
 

=No Deserializer found to deserialize

Expand Messages
  • kkhampa
    I am getting an error w/ some encoding issue. I have two classes, Entry and Directory. Directory is the server class. In the client class I call a method in
    Message 1 of 1 , Oct 16, 2003
      I am getting an error w/ some encoding issue. I have two classes,
      Entry and Directory. Directory is the server class. In the client
      class I call a method in the Directory class, that returns an object
      of type Entry. This is where the problem is. It says that it is
      unable to encode it.

      Here is the error I am getting:


      Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client;
      msg=No Deserializer found to deserialize a
      'urn:directoryserver:entry' using encoding style
      'http://schemas.xmlsoap.org/soap/encoding/'.;
      targetException=java.lang.IllegalArgumentException: No Deserializer
      found to deserialize a 'urn:directoryserver:entry' using encoding
      style 'http://schemas.xmlsoap.org/soap/encoding/'.]
      at org.apache.soap.rpc.Call.invoke(Call.java:294)
      at Directory.Client.main(Client.java:146)




      I am sure the error is w/ my DeploymentDescriptor.xml file:

      <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
      id="urn:directoryserver">
      <isd:provider type="java"
      scope="Application"
      methods="add addEntry size entryAt search">
      <isd:java class="Directory.Directory"/>
      </isd:provider>

      <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultL
      istener>
      <isd:mappings>
      <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:x="urn:directoryserver"
      qname="x:entry"
      javaType="Directory.Entry"

      java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"

      xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
      </isd:mappings>

      </isd:service>




      Here is the part of code in the Client file where i get an error:

      Integer place = new Integer(0);
      System.out.println
      ("This is place : " + place);


      call = new
      Call();

      call.setTargetObjectURI("urn:directoryserver");

      call.setMethodName("entryAt");

      call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);

      params = new
      Vector();


      params.addElement(new Parameter("place", Integer.class,
      place, null));
      call.setParams
      (params);

      resp =
      call.invoke(url, "" );

      if (
      resp.generatedFault() ) {
      Fault
      fault = resp.getFault ();

      System.out.println("The call failed: ");

      System.out.println("Fault Code = " + fault.getFaultCode());

      System.out.println("Fault String = " + fault.getFaultString
      ());
      }
      else {

      Parameter result = resp.getReturnValue();

      //System.out.println(result.getValue());

      Object value = result.getValue();
      Entry
      ent = (Entry)value;

      System.out.println(ent.getfname());
      }
    Your message has been successfully submitted and would be delivered to recipients shortly.