in reply to SOAP Beginner ... I hate to impose
You can't pass the XML to the call like that you will need to build up your document using SOAP::Data and then use call you might have something rather like:
I have omitted most of the elements within WSRateQuoteHostRequest for clarity, but I guess you can work out where they have to go.use strict; use SOAP::Lite +trace => 'all'; + my $ns = 'http://www.XXXXX.com/WebServices/HostService'; my $ep = 'http://localhost/'; + my $lite = SOAP::Lite->uri($ns)->proxy($ep)->on_action( sub { join "", + @_ } ); + $lite->autotype(0); $lite->soapversion('1.1'); + $lite->serializer()->namespaces({'http://schemas.xmlsoap.org/soap/enve +lope/' => 'soap'}); + + $lite->autotype(0); + + my $doc = SOAP::Data->name('doRateQuote')->uri($ns)->prefix('m'); + + my $value = SOAP::Data->value( SOAP::Data->name( WSRateQuoteHostRequest => \SOAP::Data->value(SOAP::Data->name( destZipCode => '038 +72' ), SOAP::Data->name( originZipCode => '30263' ), SOAP::Data->name( fmsLocationId => 'XXXXX' ) ))->type('ns100:WSRateQuoteHostRequest') ->attr({'xmlns:ns100' => "java:com.XXXXX.webservice"})); + + + + my $res = $lite->call($doc => $value); + print $res, "\n";
/J\
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: SOAP Beginner ... I hate to impose
by hermonat (Initiate) on Feb 18, 2005 at 20:59 UTC | |
by hermonat (Initiate) on Feb 18, 2005 at 22:19 UTC | |
by hermonat (Initiate) on Feb 18, 2005 at 22:54 UTC | |
by gellyfish (Monsignor) on Feb 21, 2005 at 10:28 UTC |