I hate to even impose here with my question, but it seems that I get more lost with every attempt. I realize there is more I have to educate myself on concering SOAP and the SOAP::Lite PM. So forgive me for ignorance. I've just not been able to solve this one yet.
Most of my Perl experience is with CGI and database based. So if you can help ... PLEASE!
The task I have at hand is to integrate the ability to use SOAP to attain shipping rates from a shipping provider given specific parameters (weight, zipcode from, zipcode to, etc.). They offer a WSDL interface using SOAP I presume and even give an on-line example. I just haven't been able to get it to work.
The XML, partially edited, is below that will complete the request:
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <env:Body> <m:doRateQuote xmlns:m="http://www.XXXXX.com/WebServices/HostServ +ice" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <wSRateQuoteHostRequest xmlns:ns100="java:com.XXXXX.webservice" xsi:type="ns100:WSRateQuoteHostRequest"> <destZipCode xsi:type="xsd:string">03872</destZipCode> <originZipCode xsi:type="xsd:string">30263</originZipCode> <fmsLocationId xsi:type="xsd:string">XXXXX</fmsLocationId> <weight soapenc:arrayType="xsd:string[1]"> <xsd:string xsi:type="xsd:string">100</xsd:string> </weight> <direction xsi:type="xsd:string">S</direction> <userName xsi:type="xsd:string">XXXXX</userName> <serviceCompany xsi:type="xsd:string">XXXXX</serviceCompany> <shipmentClass soapenc:arrayType="xsd:string[1]"> <xsd:string xsi:type="xsd:string">50</xsd:string> </shipmentClass> <password xsi:type="xsd:string">XXXXX</password> <chargeType xsi:type="xsd:string">P</chargeType> </wSRateQuoteHostRequest> </m:doRateQuote> </env:Body> </env:Envelope>
I've tried to implement this with the following Perl code:
#!/usr/bin/perl -w use strict; use SOAP::Lite; my $soap = SOAP::Lite ->uri('java:com.usfc.usfnet.webservice') ->proxy('http://www.usfnet.com/WebServices/HostService') ; print $soap->doRateQuote(XML FROM ABOVE)->result();
When executed, I don't get anything. No error messages. Nothing.
I am additedly only familiar with XML and even less so with SOAP. So my code could be completely irrelevant and filled with issues.
Would some kind person be willing to throw me a bone?
Thank you in advance for your kindness!
Bill
Edit by castaway - added code tags
In reply to SOAP Beginner ... I hate to impose by hermonat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |