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

Re: [soaplite] Problem with capturing fault SOAP::Lite

Expand Messages
  • Mithun Bhattacharya
    I don t seem to be able to recreate your scenario. I tried setting the URL wrong in the proxy and SOAP::Lite says 404 Not Found at. If the host part is wrong
    Message 1 of 3 , Sep 23, 2010
    • 0 Attachment
      I don't seem to be able to recreate your scenario.

      I tried setting the URL wrong in the proxy and SOAP::Lite says 404 Not Found at. If the host part is wrong the script error's out with 500 Can't connect to In either case you won't get can't call method fault.

      Looking at the error message in itself I would say the problem is because $output is undef though I can't think of a scenario where that could take place.

      Can you post the line 353 of test.pl so that we can respond better ?


      From: jaikanth <Jaikanth.Krishnaswamy@...>
      To: soaplite@yahoogroups.com
      Sent: Thu, September 16, 2010 12:59:12 PM
      Subject: [soaplite] Problem with capturing fault SOAP::Lite

      I am a beginner to using SOAP::Lite with perl
      Below is a code snippet I am using. I managed to induce a fault by providing an incorrect proxy.

      use SOAP::Lite;

      my $client = SOAP::Lite->new();
      $client->uri('some uri');
      $client->proxy("some incorrect proxy");
      my $message=SOAP::Data->name(some data);
      my $output=$client->methodname($message);
      print "$output";
      unless ($output->fault)
      {
      # Do something here
      }
      else
      {
      #do something else here
      }
      Can't call method "fault" without a package or object reference at ./test.pl line 353.


    • Eric Comeau
      I m sure I ran into the same issue before and now I always check if the returned result is defined or not... can t remember if a timeout will cause this -
      Message 2 of 3 , Sep 24, 2010
      • 0 Attachment
        I'm sure I ran into the same issue before and now I always check if the
        returned result is defined or not... can't remember if a timeout will
        cause this - maybe a firewall is preventing you from getting to the
        server.


        On Thu, 2010-09-23 at 13:33 -0700, Mithun Bhattacharya wrote:
        >
        > I don't seem to be able to recreate your scenario.
        >
        > I tried setting the URL wrong in the proxy and SOAP::Lite says 404 Not
        > Found at. If the host part is wrong the script error's out with 500
        > Can't connect to In either case you won't get can't call method fault.
        >
        > Looking at the error message in itself I would say the problem is
        > because $output is undef though I can't think of a scenario where that
        > could take place.
        >
        > Can you post the line 353 of test.pl so that we can respond better ?
        >
        >
        >
        > ______________________________________________________________________
        > From: jaikanth <Jaikanth.Krishnaswamy@...>
        > To: soaplite@yahoogroups.com
        > Sent: Thu, September 16, 2010 12:59:12 PM
        > Subject: [soaplite] Problem with capturing fault SOAP::Lite
        >
        > I am a beginner to using SOAP::Lite with perl
        > Below is a code snippet I am using. I managed to induce a fault by
        > providing an incorrect proxy.
        >
        > use SOAP::Lite;
        >
        > my $client = SOAP::Lite->new();
        > $client->uri('some uri');
        > $client->proxy("some incorrect proxy");
        > my $message=SOAP::Data->name(some data);
        > my $output=$client->methodname($message);
        > print "$output";
        > unless ($output->fault)
        > {
        > # Do something here
        > }
        > else
        > {
        > #do something else here
        > }
        > Can't call method "fault" without a package or object reference
        > at ./test.pl line 353.
        >
        >
        >
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.