|
From: Thorsten H. <tho...@ar...> - 2008-12-16 08:22:19
|
Hi all,
I'm still encountering problems...
Here's my actual test script:
#!/usr/bin/perl -w
use SOAP::Lite +trace => 'debug';
my $plz = SOAP::Lite
->service('file:/path/to/Service.wsdl')
->proxy("http://1.2.3.4:8080/path/to/service");
my $serializer = $plz->serializer();
$serializer->register_ns("http://foo.bar.de","q0");
$serializer->register_ns("http://foo.bar.de","q1");
print($serializer->envelope(
method => 'q0:updatePLZInformationen',
SOAP::Data->type("xsd:string")->name("q0:clientid" => "ska" ),
SOAP::Data->type("xsd:string")->name("q0:securitytoken" => "ska" ),
SOAP::Data->type("tns2:PLZInfo")->name("q0:plzinfos")->value(
\SOAP::Data->value(
SOAP::Data->type("xsd:string")->name("q1:kurzname")->value("gargel"),
SOAP::Data->type("xsd:string")->name("q1:plz")->value("54321"),
SOAP::Data->type("xsd:string")->name("q1:stadt")->value("Gnarz"),
SOAP::Data->type("xsd:string")->name("q1:status")->value("0815"),
SOAP::Data->type("xsd:string")->name("q1:typ")->value("2"),
SOAP::Data->type("xsd:string")->name("q1:zusatz")->value("vorne links")
)
)
));
But it seems, that the data never gets send...
If I paste the dropped-out SOAP-message into soapUI and send it to the server, all is fine.
Sorry for probably asking stupid questions, but this is my first soap-lite project.
Thanks in advance,
Thorsten
________________________________
Von: Thorsten Harms [mailto:tho...@ar...]
Gesendet: Fr 12.12.2008 09:31
An: soa...@li...
Betreff: Re: [Soaplite-devel] Problems with SOAP::Lite client
Hi Rob,
that didn't work out either, but I got an example from the perlmonks yesterday:
#!/usr/bin/perl --
use strict;
use warnings;
use SOAP::Lite;
use SOAP::Lite 0.65 +trace => 'debug';
my $soap = SOAP::Lite->proxy( 'http://localhost/blah/DummyService' );
my $serializer = $soap->serializer();
print $serializer->envelope(
method => 'updatePLZInformationen',
SOAP::Data->type("xsd:string")->name( "clientid" => "test" ),
SOAP::Data->type("xsd:string")->name( "securitytoken" => "test" ),
SOAP::Data->type("tns2:PLZInfo")->name("plzinfos")->value(
\SOAP::Data->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")
)
)
);
I'm following this trace right now. The SOAP-message looks promising:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope 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:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<updatePLZInformationen>
<clientid xsi:type="xsd:string">test</clientid>
<securitytoken xsi:type="xsd:string">test</securitytoken>
<plzinfos xsi:type="tns2:PLZInfo">
<kurzname xsi:type="xsd:string">gargel</kurzname>
<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>
</plzinfos>
</updatePLZInformationen>
</soap:Body>
</soap:Envelope>
Regards,
Thorsten
________________________________
Von: Robert Landrum [mailto:Rob...@co...]
Gesendet: Do 11.12.2008 18:24
An: Thorsten Harms
Cc: soa...@li...
Betreff: Re: [Soaplite-devel] Problems with SOAP::Lite client
Have you tried \@data? That probably won't work.
@data = map { SOAP::Data->value($_) } @data;
Try that...
Rob
Thorsten Harms wrote:
> 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
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you. Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Soaplite-devel mailing list
> Soa...@li...
> https://lists.sourceforge.net/lists/listinfo/soaplite-devel
>
|