Loading ...
Sorry, an error occurred while loading the content.

SOAP Lite problems.

Expand Messages
  • kartik_sxn
    I am running a local StockQuoteService , http://localhost:8080/axis2/services/StockQuoteService?wsdl $stockprice=SOAP::Lite
    Message 1 of 2 , Nov 12, 2009
    • 0 Attachment
      I am running a local StockQuoteService ,
      http://localhost:8080/axis2/services/StockQuoteService?wsdl

      $stockprice=SOAP::Lite ->service('http://localhost:8080/axis2/service/
      StockQuoteService?wsdl') ->getPrice('IBM'); print Dumper($stockprice);
      The result returns $VAR1 = undef;

      I am getting a undef value , what is
      the correct way to call a webservice using Perl?

      When I run the code with URL I get the following SOAP message returned
      <code>
      <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Action>http://www.w3.org/2005/08/addressing/soap/fault</wsa:Action></soapenv:Header><soapenv:Body><soapenv:Fault><faultcode>VersionMismatch</faultcode><faultstring>Only SOAP 1.1 or SOAP 1.2 messages are supported in the system</faultstring><detail /></soapenv:Fault></soapenv:Body></soapenv:Envelope>
      </code>


      Can somebody guide me where I am getting wrong? Which are the best modules to parse WSDLs in Perl?
    • martin.busik@busik.de
      Hi, ... You can t test a SOAP-Webservice by entering its URL into a web browser. Use a tool like SOAPUI (www.soapui.org) ... As a first step, use the
      Message 2 of 2 , Nov 12, 2009
      • 0 Attachment
        Hi,

        > When I run the code with URL I get the following SOAP message returned

        You can't "test" a SOAP-Webservice by entering its URL into a web browser. Use a tool
        like SOAPUI (www.soapui.org)

        > I am getting a undef value , what is
        > the correct way to call a webservice using Perl?

        As a first step, use the debugging options of SOAP::Lite, e.g.

        use SOAP::Lite (+trace => [qw(transport debug parameters)]);

        then you can see, what request goes to the server and what response you get.
        Once you have the response, it is easier to find out what went wrong.

        Cheers,
        Martin
      Your message has been successfully submitted and would be delivered to recipients shortly.