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

Using WebService WDSL file--Help how to

Expand Messages
  • kiprop777
    I am trying to develop a client for a broker service using SOAP::Lite. I am testing their simple Echo() function so far with no success. Appears that the
    Message 1 of 1 , Jan 4, 2004
    View Source
    • 0 Attachment
      I am trying to develop a client for a broker service using SOAP::Lite.
      I am testing their simple Echo() function so far with no success.
      Appears that the WebService encoding is not matching with
      SOAP::Lite's default SOAP encoding. Here is the code I am using with
      the service's WDSL file as well as the request and respose XML's

      #!/usr/bin/perl -w
      use strict;
      use SOAP::Lite + trace => 'debug';
      my $word='I am here today';
      my $service = SOAP::Lite
      ->
      service('http://api.efxnow.com/DEMOWebServices2.3/Service.asmx?WSDL')
      -> Echo(SOAP::Data->name("Message" => "$word")->type('xsd:string'));

      print $service->call->faultstring if $service->call->fault;
      exit;


      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema"
      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><Echo
      xmlns=""><Message xsi:type="xsd:string">I am here
      today</Message></Echo></SOAP-ENV:Body></SOAP-ENV:Envelope>

      SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 (Internal
      Server Error) Internal Server Error.
      Cache-Control: private
      Date: Sun, 04 Jan 2004 21:26:08 GMT
      Server: Microsoft-IIS/6.0
      Content-Length: 488
      Content-Type: text/xml; charset=utf-8
      Client-Date: Sun, 04 Jan 2004 21:26:14 GMT
      Client-Peer: 12.161.223.47:80
      Client-Response-Num: 1
      MicrosoftOfficeWebServer: 5.0_Pub
      X-AspNet-Version: 1.1.4322
      X-Powered-By: ASP.NET

      <?xml version="1.0" encoding="utf-8"?>
      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <soap:Body>
      <soap:Fault>
      <faultcode>soap:Server</faultcode>
      <faultstring>Server was unable to process request. --> Object
      reference not set to an instance of an object.</faultstring>
      <detail />
      </soap:Fault>
      </soap:Body>
      </soap:Envelope>
      Can't call method "call" on an undefined value at atest2 line 9.


      How can I get this simple Echo() function to work. This will be key to
      also getting the other services to work. Services which dont require
      parameters such as GetTime() work just fine.
      Thanks
      Kip
    Your message has been successfully submitted and would be delivered to recipients shortly.