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

Re: [soaplite] hlp with the following debug errors

Expand Messages
  • 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 1 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.