When I run your code I get an envelope which looks on balance to okay:

<?xml version="1.0" encoding="UTF-8"?> <Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:namesp2="http://namespaces.soaplite.com/perl" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Body> <changeDeliveryState xmlns="http://my_serv/services/DeliveryWS?wsd +l"> <c-gensym3> <namesp1:Context xmlns:namesp1="http://my_serv/services/Delive +ryWS?wsdl" xsi:type="namesp2"> <agent xsi:type="xsd:int">1</agent> <user xsi:type="xsd:string">jbbec</user> </namesp1:Context> </c-gensym3> <c-gensym8 xsi:type="xsd:int">526101</c-gensym8> <c-gensym10 xsi:type="xsd:int">2</c-gensym10> </changeDeliveryState> </Body> </Envelope>
Although the extra <c-gensym3 /> element seems to be erroneous and can be removed by changing the \SOAP::Data->value($request_obj->as_soap_data) to simply $request_obj->as_soap_data. The missing namespace prefix on the SOAP envelope would appear to be a bug in SOAP::Lite and can be fixed by omitting the setting of the soapversion().

However I suspect that your actual error might be coming from elsewhere, could you post the output you get when you use:

use SOAP::Lite +trace => 'all';
So we can see what XML is actually being generated and returned.

/J\


In reply to Re^3: using a client SOAP with SOAP::Lite with ComplexType by gellyfish
in thread using a client SOAP with SOAP::Lite with ComplexType by jeanba

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.