471,310 Members | 1,075 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,310 software developers and data experts.

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

Hi All,

I want to pass an array argument to the java webservice from perl client using SOAP::LITE package. Please let me know if anyone knows about this.

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
Expand|Select|Wrap|Line Numbers
  1. @appinfo=("F76B9A80-72E0-11DC-8817-001320CAE428","12512D6A-72E6-11DC-A17E-001320CAE428","12776304-72E6-11DC-A17E-001320CAE428");
  2. @metricinfo=("response_time|0","servcer_count|1000");
  3. $seperator="|";
  5. my $result =  SOAP::Lite
  6.     -> uri('http://www.soaplite.com/Demo')
  7.     -> proxy('')
  8.     -> publishSimpleMetric(@appinfo,@metricinfo,$seperator);
  10. unless ($result->fault) {
  11.         print "RESULT: ".$result->result();
  12.   } else {
  13.     print "ERROR:";
  14.     print $result->faultcode();
  15.     print $result->faultdetail();
  16.     print "\n";
  17.   }
but following error occured
Expand|Select|Wrap|Line Numbers
  1. SOAP::Transport::HTTP::Client::send_receive: POST
  2. Accept: text/xml
  3. Accept: multipart/*
  4. Content-Length: 908
  5. Content-Type: text/xml; charset=utf-8
  6. SOAPAction: "http://www.soaplite.com/Demo#testPublishMetric"
  8. <?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>
  9. SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error
  10. Connection: close
  11. Date: Wed, 07 Nov 2007 09:06:09 GMT
  12. Server: Apache-Coyote/1.1
  13. Content-Type: text/xml;charset=UTF-8
  14. Client-Date: Sat, 10 Nov 2007 20:48:45 GMT
  15. Client-Response-Num: 1
  17. <?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>
  18. ERROR:soap:Server
Thanks in advance

- Parimal
Nov 7 '07 #1
1 8126
971 Expert 512MB
I do not have any experience when it comes to SOAP. If someone else here is not able to help you, then I would suggest that post a question on SOAP::Lite for Perl mailing list.

Nov 8 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Lamar | last post: by
3 posts views Thread by Lucvdv | last post: by
1 post views Thread by Julio Delgado | last post: by
1 post views Thread by gezerpunta | last post: by
reply views Thread by cbeels | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.