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

Re: [soaplite] how to catch fault message?

Expand Messages
  • Eric Bridger
    if ( $soap- fault() ) { print Error: - . $soap- faultcode . - . $soap- faultstring . n ; } You could also break up your call to check if the service is
    Message 1 of 2 , Aug 31, 2006
    View Source
    • 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
      >
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.