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

hlp with the following debug errors

Expand Messages
  • David Inglis
    Can anybody please interpret where I may be going wrong here Here is the code use SOAP::Lite +debug = debug; my $request = SOAP::Lite -
    Message 1 of 2 , Nov 2, 2004
    • 0 Attachment
      Can anybody please interpret where I may be going wrong here


      Here is the code

      use SOAP::Lite +debug =>debug;


      my $request = SOAP::Lite
      -> uri('http://national.atdw.com.au/soap')
      ->
      proxy('http://national.atdw.com.au/soap/AustralianTourismWebService.asmx?WDSL',Timeout
      => 60000);

      $strDistributorKey = "xxxxxxxxxxxxx";
      $strCommandName = "GetCities";
      $strCommandParameter = "<parameters>";
      $strCommandParameter = $strCommandParameter .
      "<row><param>COUNTRY</param><value>AUSTRALIA</value></row>";
      $strCommandParameter = $strCommandParameter .
      "<row><param>STATE</param><value>QUEENSLAND</value></row>";
      $strCommandParameter = $strCommandParameter .
      "<row><param>AREA</param><value>SUNSHINE COAST</value></row>";
      $strCommandParameter = $strCommandParameter .
      "<row><param>AREA_MATCH_TYPE</param><value>EXACT</value></row>";
      $strCommandParameter = $strCommandParameter . "</parameters>";

      $result =
      $request->new($strDistributorKey,$strCommandName,$strCommandParameter);

      if ($result->fault)
      {
      die SOAP::Fault->faultcode('Server.Custom') # will be qualified
      ->faultstring('Died in server method')
      ->faultdetail(bless {code => 1} => 'BadError')
      ->faultactor('http://www.soaplite.com/custom');
      # printf("SOAP Error: %s: %s\n\t%s\n",
      # $result->faultcode,
      # $result->faultstring,
      # $result->faultdetail);
      }
      else
      {
      print $result->result,"\n";
      }
      ~


      Here is the output






      SOAP::Transport::HTTP::Client::send_receive: POST
      http://national.atdw.com.au/soap/AustralianTourismWebService.asmx?WDSL HTTP/1.1
      Accept: text/xml
      Accept: multipart/*
      Content-Length: 457
      Content-Type: text/xml; charset=utf-8
      SOAPAction: "http://national.atdw.com.au/soap#fault"

      <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-ENV:Body><namesp1:fault
      xmlns:namesp1="http://national.atdw.com.au/soap"/></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
      Connection: close
      Date: Wed, 03 Nov 2004 05:19:21 GMT
      Server: Microsoft-IIS/5.0
      Content-Length: 491
      Content-Type: text/xml; charset=utf-8
      Client-Date: Thu, 04 Nov 2004 14:52:49 GMT
      Client-Response-Num: 1
      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:Client</faultcode>
      <faultstring>Server did not recognize the value of HTTP Header SOAPAction:
      http://national.atdw.com.au/soap#fault.</faultstring>
      <detail />
      </soap:Fault>
      </soap:Body>
      </soap:Envelope>
      Server.Custom: Died in server method[root@localhost SOAP]#

      --
      Regards


      David Inglis

      ideloveto.com.au ideloveto.com
      reddunes.com.au reddunes.com
      limpfrog.com.au limpfrog.com





      ----------------------------------------------------------------
      This message was sent using IMP, the Internet Messaging Program.
    • Duncan Cameron
      ... You are not using strict , that would have told you that debug needs to be quoted. ... This is treated as a call to the new() method of SOAP::Lite, not of
      Message 2 of 2 , Nov 5, 2004
      • 0 Attachment
        At 2004-11-03, 05:06:22 David Inglis <david.inglis@...> wrote:

        >
        >Can anybody please interpret where I may be going wrong here
        >
        >
        >Here is the code

        >use SOAP::Lite +debug =>debug;

        You are not using 'strict', that would have told you that debug needs to be quoted.

        >my $request = SOAP::Lite
        > -> uri('http://national.atdw.com.au/soap')
        > ->
        >proxy('http://national.atdw.com.au/soap/AustralianTourismWebService.asmx?WDSL',Timeout
        >=> 60000);
        >
        >$strDistributorKey = "xxxxxxxxxxxxx";
        >$strCommandName = "GetCities";
        >$strCommandParameter = "<parameters>";
        >$strCommandParameter = $strCommandParameter .
        >"<row><param>COUNTRY</param><value>AUSTRALIA</value></row>";
        >$strCommandParameter = $strCommandParameter .
        >"<row><param>STATE</param><value>QUEENSLAND</value></row>";
        >$strCommandParameter = $strCommandParameter .
        >"<row><param>AREA</param><value>SUNSHINE COAST</value></row>";
        >$strCommandParameter = $strCommandParameter .
        >"<row><param>AREA_MATCH_TYPE</param><value>EXACT</value></row>";
        >$strCommandParameter = $strCommandParameter . "</parameters>";
        >
        > $result =
        >$request->new($strDistributorKey,$strCommandName,$strCommandParameter);

        This is treated as a call to the new() method of SOAP::Lite, not of your server class. You need to use the call() method giving it 'new' as the first parameter.

        >
        >if ($result->fault)

        The variable $result now is the same as $request, so SOAP::Lite calls a remote fault() method whch explains the trace output you had.

        >{
        > die SOAP::Fault->faultcode('Server.Custom') # will be qualified
        > ->faultstring('Died in server method')
        > ->faultdetail(bless {code => 1} => 'BadError')
        > ->faultactor('http://www.soaplite.com/custom');

        SOAP::Fault is really for the server to pass a fault back to the client. There's not much point in creating a SOAP Fault here.

        Duncan
      Your message has been successfully submitted and would be delivered to recipients shortly.