From: Thorsten H. <tho...@ar...> - 2008-12-11 09:18:35
|
Hi all, I'm digging deeper into this, 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/SKADataService.wsdl'); $plz->updatePLZInformationen(SOAP::Data->type("xsd:string")->name("clientid" => "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("12345"), SOAP::Data->name("stadt")->type("xsd:string")->value("Musterstadt"), SOAP::Data->name("status")->type("xsd:string")->value("0815"), SOAP::Data->name("typ")->type("xsd:string")->value("2"), SOAP::Data->name("zusatz")->type("xsd:string")->value("hinten rechts"))->value); And here is the Debug-Output of the SOAP-Message: <?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns2="http://types.service.portal.bundeswehr.de" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:impl="http://ska.service.portal.bundeswehr.de" 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: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 problem!!! <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?!? Thanks in advance, Thorsten ________________________________ Von: Thorsten Harms [mailto:tho...@ar...] Gesendet: Do 11.12.2008 08:24 An: soa...@li... Betreff: Re: [Soaplite-devel] Problems with SOAP::Lite client Hi Frederic, thanks for the hint, but unfortunately it doesn't work... The Tivoli Data Integrator (ITDI) still doesn't recognize the array. The guy who developed the service of the ITDI said, it must receive an array of PLZInfos. But he is all into java and autogenerated code, so he is not much of a help... I'm runnin' a little short on ideas (and time...) right now. :-( Bye, Thorsten ________________________________ Von: Frédéric Solvignon [mailto:Fre...@lo...] Gesendet: Mi 10.12.2008 16:35 An: Thorsten Harms Betreff: RE: [Soaplite-devel] Problems with SOAP::Lite client Hi, Try this : SOAP::Data->type("tns2:PLZInfo")->name("plzinfos" => \SOAP::Data->value(@data) )); De : Thorsten Harms [mailto:tho...@ar...] Envoyé : mercredi 10 décembre 2008 16:12 À : soa...@li... Objet : [Soaplite-devel] Problems with SOAP::Lite client Hi, I'm currently writing a client using SOAP::Lite, that connects to an IBM Tivoli Data Integrator. 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 code: ... while(...) { # Hash zusammenbasteln $hash{"kurzname"} = $kurzname; $hash{"plz"} = $plz; $hash{"stadt"} = $stadt; $hash{"status"} = $status; $hash{"typ"} = $typ; $hash{"zusatz"} = $zusatz; push(@ary,%hash); } eval { $dss->updatePLZInformationen(@ary); }; ... sub updatePLZInformationen() { my @data = shift(); my $plz = SOAP::Lite -> service('file:/path/Service.wsdl'); $plz->updatePLZInformationen(SOAP::Data->type("xsd:string")->name("clientid" => "foo")->value, SOAP::Data->type("xsd:string")->name("securitytoken" => "bar")->value, SOAP::Data->type("tns2:PLZInfo")->name("plzinfos" => @data)); } My problem is, that the last argument ("plzinfos") does not seem to be correct, because the ITDI does not recognize it as an array. Any hints, tipps, etc. would be highly appreciated :-) Thanks in advance, Thorsten |