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

How to pass array argument to java webservice from perl client using SOAP::LITE?

Expand Messages
  • parimal_b2000
    Hi All, I want to pass an array argument to the java webservice from perl client using SOAP::LITE package. The web method declaration in java is like this
    Message 1 of 1 , Nov 7, 2007
    • 0 Attachment
      Hi All,

      I want to pass an array argument to the java webservice from perl
      client using SOAP::LITE package.

      The web method declaration in java is like this
      publishSimpleMetric(Arraylist<String> appinfo,Arraylist<String>
      metricinfo,String seperator);

      Now i tried to call the web service from perl client as follows
      Code: ( perl )

      #!/usr/local/UD/perl/bin/perl -w
      use SOAP::Lite +trace => 'debug';


      @appinfo=("F76B9A80-72E0-11DC-8817-001320CAE428","12512D6A-72E6-11DC-A17E-001320CAE428","12776304-72E6-11DC-A17E-001320CAE428");

      @metricinfo=("response_time|0","servcer_count|1000");

      $seperator="|";



      my $result = SOAP::Lite

      -> uri('http://www.soaplite.com/Demo')

      ->
      proxy('http://172.30.0.99:8080/websvc/services/testPublishMetric')

      -> publishSimpleMetric(@appinfo,@metricinfo,$seperato r);



      unless ($result->fault) {

      print "RESULT: ".$result->result();

      } else {

      print "ERROR:";

      print $result->faultcode();

      print $result->faultdetail();

      print "\n";

      }


      but following error occured
      Code: ( xml )


      SOAP::Transport::HTTP::Client::send_receive: POST
      http://172.30.0.99:8080/websvc/services/testPublishMetric

      Accept: text/xml

      Accept: multipart/*

      Content-Length: 908

      Content-Type: text/xml; charset=utf-8

      SOAPAction: "http://www.soaplite.com/Demo#testPublishMetric"



      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema"
      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><namesp1:testPublishMetric
      xmlns:namesp1="http://www.soaplite.com/Demo"><c-gensym3
      xsi:type="xsd:string">F76B9A80-72E0-11DC-8817-001320CAE428</c-gensym3><c-gensym5
      xsi:type="xsd:string">12512D6A-72E6-11DC-A17E-001320CAE428</c-gensym5><c-gensym7
      xsi:type="xsd:string">12776304-72E6-11DC-A17E-001320CAE428</c-gensym7><c-gensym9
      xsi:type="xsd:string">response_time|0</c-gensym9><c-gensym11
      xsi:type="xsd:string">servcer_count|1000</c-gensym11><c-gensym13
      xsi:type="xsd:string">|</c-gensym13></namesp1:testPublishMetric></SOAP-ENV:Body></SOAP-ENV:Envelope>

      SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500
      Internal Server Error

      Connection: close

      Date: Wed, 07 Nov 2007 09:06:09 GMT

      Server: Apache-Coyote/1.1

      Content-Type: text/xml;charset=UTF-8

      Client-Date: Sat, 10 Nov 2007 20:48:45 GMT

      Client-Response-Num: 1



      <?xml version='1.0' encoding='UTF-8'?><soap:Envelope
      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Index:
      3, Size: 3</faultstring></soap:Fault></soap:Body></soap:Envelope>

      ERROR:soap:Server



      Please let me know if any one knows the solution for this.Thanks in
      advance

      - Parimal
    Your message has been successfully submitted and would be delivered to recipients shortly.