Table of Contents

Search

  1. Preface
  2. Web Service Concepts
  3. Understanding the Web Services Provider
  4. Using the Web Services Hub Console
  5. Batch Web Service Operations
  6. Writing Client Applications
  7. Working with Web Service Sources and Targets
  8. Editing Web Service Sources and Targets
  9. Working with Web Service Mappings
  10. Working with Web Service Workflows
  11. Appendix A: Web Service Sample Client Applications
  12. Appendix B: Configure the Web Browser

Web Services Provider Guide

Web Services Provider Guide

Error Handling in .NET

Error Handling in .NET

You can implement client application error handling in .NET by placing the code in a try block and catching the SOAP Exception object. The SOAP Exception class is part of the .NET framework SDK.
You can use the following code in a try block to catch the SOAP Exception object:
try { //Code for steps explained above. } catch(SoapException fault) { // Display fault code Console.WriteLine(“fault code is : “ + fault.Code); // Display fault string Console.WriteLine(“fault string is : “ + fault.Message); // Parsing detail element XmlNode detail = fault.Detail; XmlElement WSHFaultDetails = detail[“WSHFaultDetails”, “http://www.informatica.com/PowerCenter”];      XmlElement ErrorCode= WSHFaultDetails [“ErrorCode”];      XmlElement ExtendedDetails= WSHFaultDetails [“ExtendedDetails”]; // Display error code             Console.WriteLine (“error code is : “ + ErrorCode.InnerText); // Display extended details             Console.WriteLine (“extended detail is : “ + ExtendedDetails.InnerText); }

0 COMMENTS

We’d like to hear from you!