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

6565soap client aborts during transport

Expand Messages
  • Scott
    Jan 26, 2011
    • 0 Attachment
      While testing our asp.net web app service we noticed that the client aborts if the service id down. For example if port 80 is unavailable the client aborts with a 500 internal server error. I have worked around this issue by placing an eval block but my question is why would it do that. This doesn't seem to be practical or normal behavior to exit the script on an error. Is this a possible client coding issue where i am not handling this properly?

      CLIENT CODE:
      use SOAP::Lite +trace => 'debug';
      use VSM::VSMWindows;

      my $serviceNs = 'http://g5w2502g.atlanta.hp.com/VSMapi';
      my $serviceProxy = 'http://g5w2502g.atlanta.hp.com/VSMapi/VSMapi.asmx';

      my ($soap_depot_stat,$soap_msg) = VSM::VSMWindows::CheckStatus('serviceNS'=>$serviceNs, 'proxy'=>$serviceProxy);

      print "$soap_depot_stat,$soap_msg\n";

      CLIENT FUNCTION:
      sub CheckStatus {
      my $function = 'CheckStatus';
      my $SUB = $MODULE . '::' . $function;
      my %args = @_;
      my $serviceNs = $args{'serviceNS'};
      my $serviceProxy = $args{'proxy'};
      my $stat = '';
      my $retmsg = '';

      my $soap = SOAP::Lite
      -> uri($serviceNs . '/')
      -> on_action( sub { join '/', $serviceNs, $_[1] } )
      -> proxy($serviceProxy);

      if ($soap) {
      $retmsg = $soap
      -> CheckStatus()
      -> result;

      if (!defined($retmsg)) {
      $stat = $FALSE;
      $retmsg = "SOAP FAULT ERROR";
      } else {
      $stat = $TRUE;
      }
      } else {
      $retmsg = "SOAP connection Failure";
      $stat = $FALSE;
      }
      return $stat,$retmsg;
      }

      CLIENT OUTPUT:
      schall/soap $ ./client.pl
      SOAP::Transport::HTTP::Client::send_receive: POST http://.../VSMapi/VSMapi.asmx HTTP/1.1
      Accept: text/xml
      Accept: multipart/*
      Accept: application/soap
      Content-Length: 444
      Content-Type: text/xml; charset=utf-8
      SOAPAction: http://..../VSMapi/CheckStatus

      <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><CheckStatus xmlns="http://..../VSMapi/" xsi:nil="true" /></soap:Body></soap:Envelope>
      SOAP::Transport::HTTP::Client::send_receive: 500 Can't connect to ....:80 (connect: Invalid argument)
      Content-Type: text/plain
      Client-Date: Wed, 26 Jan 2011 18:13:07 GMT
      Client-Warning: Internal response

      500 Can't connect to ....:80 (connect: Invalid argument)
      500 Can't connect to ....:80 (connect: Invalid argument)
    • Show all 2 messages in this topic