Dale1990 has asked for the wisdom of the Perl Monks concerning the following question:
I am using this code:- <complexType name="submitToRemedyForm"> - <sequence> <element name="String_1" nillable="true" type="string" /> <element name="String_2" nillable="true" type="string" /> <element name="String_3" nillable="true" type="string" /> <element name="String_4" nillable="true" type="string" /> </sequence> </complexType>
According to the debug output, the SOAP xml is missing the String_1 value and adding some other tag. Here is the output cleaned up a little.use SOAP::Lite +trace => debug; my $service = SOAP::Lite->service('https://remabsintcert/remedyAbstrac +tService/remedyAbstractService_1_0?wsdl'); print $service->submitToRemedyForm( SOAP::Data->name(String_1 => 'login'), SOAP::Data->name(String_2 => 'password'), SOAP::Data->name(String_3 => 'form'), SOAP::Data->name(String_4 => 'xxxxxxx'), );
I'm getting a client error when I try to run the code. I was able to submit the request from a different app (soapUI) and it returns the expected response so I know the service is working properly. Soap::Lite seems to be doing things to the formatting and structure to cause errors. A working request looks like:<?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:ns2="http://xxx.com/remedyAbstractService_1_0/typ +es" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xm +lns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="h +ttp://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.or +g/2001/XMLSchema-instance" xmlns:tns="http://xxx.com/remedyAbstractSe +rvice_1_0/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <tns:submitToRemedyForm> <submitToRemedyForm xsi:nil="true" xsi:type="tns:submitToRemedyFor +m" /> <String_2 xsi:type="xsd:string">password</String_2> <String_3 xsi:type="xsd:string">form</String_3> <String_4 xsi:type="xsd:string">xxxxxxx</String_4> </tns:submitToRemedyForm> </soap:Body></soap:Envelope>
What do I have to do to Soap::Lite to get it to create a request that looks like the working one? Thanks!<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envel +ope/" xmlns:typ="http://xxx/remedyAbstractService_1_0/types"> <soapenv:Header/> <soapenv:Body> <typ:submitToRemedyForm> <String_1>login</String_1> <String_2>password</String_2> <String_3>form</String_3> <String_4>xxxxxx</String_4> </typ:submitToRemedyForm> </soapenv:Body> </soapenv:Envelope>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Confusing results from Soap Lite
by Anonymous Monk on Nov 06, 2008 at 02:25 UTC |