Hi monks, I'm currently writing a soap client, that connects to an IBM tivoli data integrator. Here is the excerpt from the wsdl-file I got: Here are some excerpts from the wsdl-file:
... <element name="updatePLZInformationen"> <complexType> <sequence> <element name="clientid" nillable="true" type="xsd:string" /> <element name="securitytoken" nillable="true" type="xsd:string" /> <element maxOccurs="unbounded" minOccurs="0" name="plzinfos" type="tns2:PLZInfo" /> </sequence> </complexType> </element> ... <complexType name="PLZInfo"> <sequence> <element name="kurzname" nillable="true" type="xsd:string" /> <element name="plz" nillable="true" type="xsd:string" /> <element name="stadt" nillable="true" type="xsd:string" /> <element name="status" nillable="true" type="xsd:string" /> <element name="typ" nillable="true" type="xsd:string" /> <element name="zusatz" nillable="true" type="xsd:string" /> </sequence> </complexType>
And here is my test script:
#!/usr/bin/perl -w use SOAP::Lite +trace => 'debug'; my $plz = SOAP::Lite -> service('file:/home/orca/oracle/DataSyncTool/config/SKADataServ +ice.wsdl'); $plz->updatePLZInformationen(SOAP::Data->type("xsd:string")->name("cli +entid" => "test")->value, SOAP::Data->type("xsd:string")->name("securitytoken" => "test" +)->value, SOAP::Data->type("tns2:PLZInfo")->name("plzinfos")->value( SOAP::Data->name("kurzname")->type("xsd:string")->value( +"gargel"), SOAP::Data->name("plz")->type("xsd:string")->value("1234 +5"), SOAP::Data->name("stadt")->type("xsd:string")->value("Mu +sterstadt"), SOAP::Data->name("status")->type("xsd:string")->value("0 +815"), SOAP::Data->name("typ")->type("xsd:string")->value("2"), SOAP::Data->name("zusatz")->type("xsd:string")->value("h +inten rechts"))->value);
And here goes the soap message:
<?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:wsdlsoap="..." xmlns:tns2="...e" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="..." xmlns:wsdl="..." xmlns:impl="..." xmlns:xsi="..." xmlns:soapenc="..." xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body><impl:updatePLZInformationen> <clientid xsi:type="xsd:string">test</clientid> <securitytoken xsi:type="xsd:string">test</securitytoken> <plzinfos xsi:nil="true" xsi:type="tns2:PLZInfo" /> <-- here's the pro +blem!!! <plz xsi:type="xsd:string">12345</plz> <stadt xsi:type="xsd:string">Musterstadt</stadt> <status xsi:type="xsd:string">0815</status> <typ xsi:type="xsd:string">2</typ> <zusatz xsi:type="xsd:string">hinten rechts</zusatz> </impl:updatePLZInformationen> </soap:Body> </soap:Envelope>
As you can see, the complex type "plzinfos" closes before its variables and not after. What am I doing wrong here?!? Every hint, tip, etc. will be highly appreciated! :-)
Thanks in advance,
Thion

In reply to Problems with SOAP::Lite client by thion

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.