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

5153Client unable to detect fatal SOAP failure (e.g. unable to connect to host)

Expand Messages
  • Ollie Cook
    Jan 26, 2006
      Good evening,

      With a base install of SOAP::Lite version 0.66 I don't think it is
      possible for the user/developer to detect whether the SOAP 'call'
      failed, and I consider this a bug. I was wondering if any other
      users have come across this.

      For example, the following code returns the empty string ('') if
      SOAP::Lite is unable to communicate with the SOAP server:

      $soap->call(SOAP::Data->name($action) => $soapdata)

      This does not allow the user/developer to easily determine that there
      has been a fatal error.

      Within SOAP::Transport::HTTP the response structure is as follows during
      this instance:

      $VAR1 = bless( {
      '_content' => '',
      '_rc' => 500,
      '_headers' => bless( {
      'client-date' => 'Wed, 25 Jan
      2006 15:56:32 GMT'
      }, 'HTTP::Headers' ),
      '_msg' => 'Can\'t connect to a.b.c.d:80 (connect:
      Connection refused)',
      '_request' => ...

      _content is what is being returned to the client, where what would
      actually be more useful would be to push _msg up to the client through

      I have rolled a small patch (see #1) which will at least allow the
      user/developer to detect the 'undef' and handle that error case, but it
      doesn't expose the actual cause of the error "Can't connect to a.b.c.d",
      so I don't think this is the _correct_ fix.

      Does anyone have any opinion on what should be the correct way of pushing
      that error up the stack and into the users visibility?

      Thanks for your time,


      1: http://rt.cpan.org/Ticket/Attachment/158815/49167/HTTP.pm.patch
      Ollie Cook
      UNIX Scripter
      Information Systems

      Direct Line: 020 8834 8128
      Waterfront | Hammersmith Embankment | Chancellors Road London | W6 9HP