Dear Friends,

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

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.