<div>hi,</div>
<div> </div>
<div>I am using SOAP::lite and the module from the <a href="http://stubmaker.pl">stubmaker.pl</a> to invoke SOAP APIs from WSDL.<br> <br>my original SOAP request looks like the following<br>==============================<br>
<?xml version = "1.0" encoding = "UTF-8" ?><br><soapenv:Envelope xmlns:soapenv="<a href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>" <br>
xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>" <br>xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"><br>
<soapenv:Header><br> <USER soapenv:mustUnderstand="0" xsi:type="xsd:string">admin</USER><br> <PASSWORD soapenv:mustUnderstand="0" xsi:type="xsd:string">admin</PASSWORD><br>
<SYSTEMUSER soapenv:mustUnderstand="0" xsi:type="xsd:string"/><br> </soapenv:Header><br> <soapenv:Body><br> <ns1:getNewGroup <br>xmlns:ns1="<a href="http://www.xyznet.com/sms/smsapi/r08_00/NewGroupService">http://www.xyznet.com/sms/smsapi/r08_00/NewGroupService</a>" <br>
soapenv:encodingStyle="<a href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</a>"><br> <in0 href="#id0"/><br> <in1 href="#id1"/><br>
</ns1:getNewGroup><br> <multiRef xmlns:soapenc="<a href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</a>" <br>xmlns:ns2="<a href="http://www.xyznet.com/sms/smsapi/r08_00/model">http://www.xyznet.com/sms/smsapi/r08_00/model</a>" id="id1" <br>
soapenc:root="0" <br>soapenv:encodingStyle="<a href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</a>" <br>xsi:type="ns2:NewGroupKey"><br> <internalId xsi:type="xsd:string">16789900</internalId><br>
</multiRef><br> <multiRef xmlns:ns3="<a href="http://www.xyznet.com/sms/smsapi/r08_00/model">http://www.xyznet.com/sms/smsapi/r08_00/model</a>" <br>xmlns:soapenc="<a href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</a>" id="id0" <br>
soapenc:root="0" <br>soapenv:encodingStyle="<a href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</a>" <br>xsi:type="ns3:PartKey"><br> <internalId xsi:type="xsd:string">15</internalId><br>
<name xsi:type="xsd:string" xsi:nil="true"/><br> </multiRef><br> </soapenv:Body><br></soapenv:Envelope></div>
<div> </div>
<div> </div>
<div>My Perl module from <a href="http://stubmaker.pl">stubmaker.pl</a> that contains the above section looks like the following<br>=================================================================<br>my %methods = (<br>
getNewGroup => {<br> endpoint => '<a href="http://10.3.1.5/smsapi/services/SMSAPI/r08_00/NewGroupService">http://10.3.1.5/smsapi/services/SMSAPI/r08_00/NewGroupService</a>',<br> soapaction => '',<br>
namespace => '<a href="http://www.xyznet.com/sms/smsapi/r08_00/NewGroupService">http://www.xyznet.com/sms/smsapi/r08_00/NewGroupService</a>',<br> parameters => [<br> SOAP::Data->new(name => 'in0', type => 'tns1:PartKey', attr => {}),<br>
SOAP::Data->new(name => 'in1', type => 'tns1:NewGroupKey', attr => {}),<br> ], # end parameters<br> }, # end getNewGroup</div>
<div> </div>
<div> </div>
<div>My Perl script looks like as follows</div>
<div>=========================</div>
<div> </div>
<div>#!/ats/usr/perl -w</div>
<div>use SOAP::Lite +trace => 'debug';<br>use Data::Dumper;</div>
<div>use SMSAPIService_r08_00_NewGroupService qw(:all);</div>
<div>my $obj = new SMSAPIService_r08_00_NewGroupService;<br>$obj -> use_prefix(0);<br>$obj->readable(1);<br>$obj->want_som(1);<br>$obj->multirefinplace(1);</div>
<div>my $response = $obj->getNewGroup(En);</div>
<div> </div>
<div>My POST request<->response looks as follows</div>
<div>=========================</div>
<div> </div>
<div> use_prefix has been deprecated. if you wish to turn off or on the use of a default namespace, then please use either ns(uri) or default_ns(uri) at /ats/langs/perl_5.8.7/lib/site_perl/5.8.7/SOAP/Lite.pm line 887.<br>
URI is not provided as an attribute for method (authenticate)<br>SOAP::Transport::HTTP::Client::send_receive: POST <a href="http://10.3.1.5/smsapi/services/SMSAPI/r08_00/GroupGroupService">http://10.3.1.5/smsapi/services/SMSAPI/r08_00/GroupGroupService</a> HTTP/1.1<br>
Accept: text/xml<br>Accept: multipart/*<br>Accept: application/soap<br>Content-Length: 985<br>Content-Type: text/xml; charset=utf-8<br>SOAPAction: ""</div>
<div><?xml version="1.0" encoding="UTF-8"?><br><soap:Envelope <br> xmlns:wsdlsoap="<a href="http://schemas.xmlsoap.org/wsdl/soap/">http://schemas.xmlsoap.org/wsdl/soap/</a>" <br>
xmlns:apachesoap="<a href="http://xml.apache.org/xml-soap">http://xml.apache.org/xml-soap</a>" <br> soap:encodingStyle="<a href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</a>" <br>
xmlns:soap="<a href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>" <br> xmlns:tns1="<a href="http://www.xyznet.com/sms/smsapi/r08_00/model">http://www.xyznet.com/sms/smsapi/r08_00/model</a>" <br>
xmlns:impl="<a href="http://www.xyznet.com/sms/smsapi/r08_00/GroupGroupService">http://www.xyznet.com/sms/smsapi/r08_00/GroupGroupService</a>" <br> xmlns:wsdl="<a href="http://schemas.xmlsoap.org/wsdl/">http://schemas.xmlsoap.org/wsdl/</a>" <br>
xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>" <br> xmlns:soapenc="<a href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</a>" <br>
xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>"><br> <soap:Header><br> <USER xsi:type="xsd:string">admin</USER></div>
<div> <PASSWORD xsi:type="xsd:string">admin</PASSWORD><br> </soap:Header></div>
<div> <soap:Body><br> <impl:getNewGroup><br> <in0 xsi:nil="true" xsi:type="tns1:PartKey" InternalId="15" /><br> </impl:getNewGroup><br> </soap:Body><br>
</soap:Envelope><br>SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error<br>Connection: close<br>Date: Tue, 22 Dec 2009 14:49:49 GMT<br>Server: Apache-Coyote/1.1<br>Content-Type: text/xml;charset=utf-8<br>
Client-Date: Tue, 22 Dec 2009 14:49:57 GMT<br>Client-Peer: <a href="http://10.3.1.5:80">10.3.1.5:80</a><br>Client-Response-Num: 1</div>
<div><?xml version="1.0" encoding="UTF-8"?><br><soapenv:Envelope xmlns:soapenv="<a href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>" xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"><br>
<soapenv:Body><br> <soapenv:Fault><br> <faultcode>soapenv:Server.generalException</faultcode><br> <faultstring></faultstring><br> <detail><br> <ns1:fault href="#id0" xmlns:ns1="<a href="http://www.xyznet.com/sms/smsapi/r08_00/GroupGroupService%22/">http://www.xyznet.com/sms/smsapi/r08_00/GroupGroupService"/</a>><br>
<ns2:exceptionName xmlns:ns2="<a href="http://xml.apache.org/axis/%22%3Ecom.xyz.sms.api.r08_00.model.SMSAPIInternalException%3C/ns2:exceptionName">http://xml.apache.org/axis/">com.xyz.sms.api.r08_00.model.SMSAPIInternalException</ns2:exceptionName</a>><br>
</detail><br> </soapenv:Fault><br> <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="<a href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</a>" xsi:type="ns3:SMSAPIInternalException" xmlns:soapenc="<a href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</a>" xmlns:ns3="<a href="http://www.xyznet.com/sms/smsapi/r08_00/model">http://www.xyznet.com/sms/smsapi/r08_00/model</a>"><br>
<errorMessage xsi:type="xsd:string">Group Group Key cannot be null<br>(com.xyz.sms.common.SMSException: no user message defined)</errorMessage><br> <errorCode xsi:type="xsd:int">-9999</errorCode><br>
<messageKey xsi:type="xsd:string" xsi:nil="true"/><br> </multiRef><br> </soapenv:Body><br></soapenv:Envelope></div>
<div> </div>
<div> </div>
<div>========================================</div>
<div>I am unable to construct the SOAP xml body as in my original request wherin multiRef body content is observed and further I get 500 server error.</div>
<div>Can you please help me to recreate my request using the module generated by stubmaker?</div>
<div> </div>
<div>regards,</div>
<div>Naresh</div>
<div> </div>
<div> </div>