K
Kari
Hi,
I'm just starting with Perl and SOAP::Lite package so please be
patient. The problem that I'm facing is that I have a quite simple
webservice that I want to call. I managed to do so reading thry
examples and docs. Then I updated my SOAP:Lite package to most recent
version (0.69 I guess) from CPAN. Now the same script won't work with
the webservice. With a little debuggin' I found that the SOAP call to
the webservice is totally different now. And I think I need set
something to serializer to get "old format" back. If somebody please
would give some pointers and maybe and example it would be greatly
appreciated.
I'll paste here the input data +trace option gave me.
So I this is the working call that gave me results:
<?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:execute xmlns:namesp1="urn:XXX">
<CustDataByIdInput_1>
<password xsi:type="xsd:string">xxxxxx</password>
<systemId xsi:type="xsd:string">xyx</systemId>
<username xsi:type="xsd:string">DRM</username>
<customerId xsi:type="xsd:int">98747</customerId>
<maxAmount xsi:type="xsd:int">1</maxAmount>
<queryId xsi:type="xsd:string"/>
</CustDataByIdInput_1>
</namesp1:execute>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
After update the same script produces this kind of call:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<execute xmlns="urn:XXX">
<CustDataByIdInput_1>
<password xsi:type="xsd:string">xxxxxx</password>
<systemId xsi:type="xsd:string">xyx</systemId>
<username xsi:type="xsd:string">DRM</username>
<customerId xsi:type="xsd:int">98747</customerId>
<maxAmount xsi:type="xsd:int">1</maxAmount>
<queryIdxsi:type="xsd:string" />
</CustDataByIdInput_1>
</execute>
</soap:Body>
</soap:Envelope>
and finally here's part of the script
my $service = SOAP::Lite
-> uri('urn:XXX')
#-> encoding('iso-8859-1')
-> proxy('http://xxx.xxx.xxx.xxx:xxxx/custdatabyid-jaxrpc/cust-
data-by-id')
my $result= $service -> execute (SOAP:ata-
SOAP:ata->name("password" => 'xxxxxx'),
SOAP:ata->name("systemId" => 'xyx'),
SOAP:ata->name("username" => 'DRM'),
SOAP:ata->name("customerId" => $cust),
SOAP:ata->name("maxAmount" =>'1'),
SOAP:ata->name("queryId" => ''))));
brgds,
Kari
I'm just starting with Perl and SOAP::Lite package so please be
patient. The problem that I'm facing is that I have a quite simple
webservice that I want to call. I managed to do so reading thry
examples and docs. Then I updated my SOAP:Lite package to most recent
version (0.69 I guess) from CPAN. Now the same script won't work with
the webservice. With a little debuggin' I found that the SOAP call to
the webservice is totally different now. And I think I need set
something to serializer to get "old format" back. If somebody please
would give some pointers and maybe and example it would be greatly
appreciated.
I'll paste here the input data +trace option gave me.
So I this is the working call that gave me results:
<?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:execute xmlns:namesp1="urn:XXX">
<CustDataByIdInput_1>
<password xsi:type="xsd:string">xxxxxx</password>
<systemId xsi:type="xsd:string">xyx</systemId>
<username xsi:type="xsd:string">DRM</username>
<customerId xsi:type="xsd:int">98747</customerId>
<maxAmount xsi:type="xsd:int">1</maxAmount>
<queryId xsi:type="xsd:string"/>
</CustDataByIdInput_1>
</namesp1:execute>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
After update the same script produces this kind of call:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<execute xmlns="urn:XXX">
<CustDataByIdInput_1>
<password xsi:type="xsd:string">xxxxxx</password>
<systemId xsi:type="xsd:string">xyx</systemId>
<username xsi:type="xsd:string">DRM</username>
<customerId xsi:type="xsd:int">98747</customerId>
<maxAmount xsi:type="xsd:int">1</maxAmount>
<queryIdxsi:type="xsd:string" />
</CustDataByIdInput_1>
</execute>
</soap:Body>
</soap:Envelope>
and finally here's part of the script
my $service = SOAP::Lite
-> uri('urn:XXX')
#-> encoding('iso-8859-1')
-> proxy('http://xxx.xxx.xxx.xxx:xxxx/custdatabyid-jaxrpc/cust-
data-by-id')
my $result= $service -> execute (SOAP:ata-
\SOAP:ata->value(name("CustDataByIdInput_1" =>
SOAP:ata->name("password" => 'xxxxxx'),
SOAP:ata->name("systemId" => 'xyx'),
SOAP:ata->name("username" => 'DRM'),
SOAP:ata->name("customerId" => $cust),
SOAP:ata->name("maxAmount" =>'1'),
SOAP:ata->name("queryId" => ''))));
brgds,
Kari