SOAP::Lite serializer or version problem

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::Data-
name("CustDataByIdInput_1" =>
\SOAP::Data->value(
SOAP::Data->name("password" => 'xxxxxx'),
SOAP::Data->name("systemId" => 'xyx'),
SOAP::Data->name("username" => 'DRM'),
SOAP::Data->name("customerId" => $cust),
SOAP::Data->name("maxAmount" =>'1'),
SOAP::Data->name("queryId" => ''))));


brgds,
Kari
 
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::Data->name("CustDataByIdInput_1" =>

\SOAP::Data->value(
SOAP::Data->name("password" => 'xxxxxx'),
SOAP::Data->name("systemId" => 'xyx'),
SOAP::Data->name("username" => 'DRM'),
SOAP::Data->name("customerId" => $cust),
SOAP::Data->name("maxAmount" =>'1'),
SOAP::Data->name("queryId" => ''))));

brgds,
Kari

Never mind, got it to work on my own. By replacing uri('urn:XXX') with
ns('urn:XXX')...


K
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top