SOAP::Lite serializer or version problem

Discussion in 'Perl Misc' started by Kari, Mar 2, 2007.

  1. Kari

    Kari Guest

    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
    Kari, Mar 2, 2007
    #1
    1. Advertising

  2. Kari

    Kari Guest

    On 2 maalis, 12:01, "Kari" <> wrote:
    > 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
    Kari, Mar 3, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. codehead
    Replies:
    3
    Views:
    406
    codehead
    Jun 13, 2005
  2. V Green
    Replies:
    0
    Views:
    840
    V Green
    Feb 5, 2008
  3. Aaron Brady

    SQL, lite lite lite

    Aaron Brady, Dec 29, 2008, in forum: Python
    Replies:
    15
    Views:
    744
    Aaron Brady
    Jan 1, 2009
  4. Replies:
    0
    Views:
    166
  5. droesler
    Replies:
    2
    Views:
    486
    droesler
    Aug 31, 2010
Loading...

Share This Page