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

Problem when sending Perl Objects to Java Server

Expand Messages
  • anders.johansson@aspiro.com
    What is the problem in this Debug message? Perl code: use SOAP::Lite; my $SoapObject = bless {s1 = String1 , s2 = String2 } = SoapObject ; my $client =
    Message 1 of 1 , Nov 5, 2001
    • 0 Attachment
      What is the problem in this Debug message?

      Perl code:

      use SOAP::Lite;

      my $SoapObject = bless {s1 => 'String1', s2 => 'String2'}
      => 'SoapObject';

      my $client = SOAP::Lite->uri('urn:SoapResponse');
      $client->proxy('http://localhost:8080/soap/servlet/rpcrouter');
      $client->maptype({SoapObject => 'urn:xml-soap-soapobject'});
      $client->on_debug(sub{print@_});
      my $response = $client->soapResponse($SoapObject);

      Debug message:

      POST http://localhost:8080/soap/servlet/rpcrouter
      Content-Length: 637
      Content-Type: text/xml
      SOAPAction: "urn:SoapResponse#soapResponse"

      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-
      ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-
      ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-
      ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:namesp1="urn:xml-
      soap-soapobject"><SOAP-ENV:Body><namesp2:soapResponse
      xmlns:namesp2="urn:SoapResponse"><SoapObject
      xsi:type="namesp1:SoapObject">
      <s1 xsi:type="xsd:string">String1</s1>
      <s2 xsi:type="xsd:string">String2</s2>
      </SoapObject></namesp2:soapResponse></SOAP-ENV:Body></SOAP-
      ENV:Envelope>
      HTTP/1.0 400 Bad Request
      Content-Length: 531
      Content-Type: text/xml; charset=UTF-8
      Client-Date: Mon, 05 Nov 2001 12:50:29 GMT
      Client-Peer: 127.0.0.1:8080
      Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 2.2; Java
      1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)
      Set-Cookie: JSESSIONID=3z3gn5xu21;Path=/soap
      Set-Cookie2: JSESSIONID=3z3gn5xu21;Version=1;Discard;Path="/soap"

      <SOAP-ENV:Envelope xmlns:SOAP-
      ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema">
      <SOAP-ENV:Body>
      <SOAP-ENV:Fault>
      <faultcode>SOAP-ENV:Client</faultcode>
      <faultstring>No Deserializer found to deserialize a 'urn:xml-soap-
      soapobject:SoapObject' using encoding
      style 'http://schemas.xmlsoap.org/soap/encoding/'.</faultstring>
      <faultactor>/soap/servlet/rpcrouter</faultactor>
      </SOAP-ENV:Fault>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>
    Your message has been successfully submitted and would be delivered to recipients shortly.