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

5577Re: [soaplite] how to catch fault message?

Expand Messages
  • Eric Bridger
    Aug 31, 2006
    • 0 Attachment
      if ( $soap->fault() ) {
      print 'Error: - '
      . $soap->faultcode . '- '
      . $soap->faultstring . "\n";
      }

      You could also break up your call to check if the service is alive:

      $service = SOAP::Lite->proxy($proxy)->on_fault( sub { } );
      if ( !$service->is_success ) {
      print "Error\n";
      }


      On Thu, 2006-08-31 at 15:57, didi726tao wrote:
      > $soap = SOAP::Lite
      > -> uri('urn:SyncContactInfo')
      > -> proxy($endpoint)
      > -> encoding('iso-8859-1')
      > -> syncContactInfo($tmpstring, $msgValue_elements);
      >
      > I am calling webservice this way. But sometimes the webservice is up
      > but I can't get the call through and get the result back.
      >
      > How can I catch what the fault message here?
      > Thanks a lot for your help!
      >
      > Marvin
      >
      >
      >
      >
    • Show all 2 messages in this topic