Table of Contents

Search

  1. Preface
  2. Web Services
  3. SOAP Web Services
  4. WSDL Data Object
  5. Schema Object
  6. How to Create a SOAP Web Service
  7. Operation Mappings
  8. Parsing Web Service SOAP Messages
  9. Generating Web Service SOAP Messages
  10. Web Service Consumer Transformation
  11. REST Web Services
  12. How to Create a REST Web Service
  13. REST Web Service Consumer Transformation
  14. REST Web Service Consumer Transformation Use Cases
  15. REST and SOAP Web Service Administration
  16. Datatype Compatibility

Web Services Guide

Web Services Guide

Predefined Faults

Predefined Faults

For a predefined fault, the web service uses a fault element to define the fault. Configure a Fault transformation to return a custom error message.
When you configure a Fault transformation in a web service, you must define the operation mapping logic that returns the error condition. You need to define a transformation to generate the error message to pass to the Fault transformation.
When you define a Fault transformation, you define the data to return in the fault code, fault string, and fault actor. You can also add more elements in the fault message in order to return more information to the web service client. When you define the elements in the fault, the wizard adds the elements to the detail group. You can define multiple-occurring elements and create hierarchical relationships between groups of elements in the detail group.
You can use the same Fault transformation multiple times in a mapping when the error message structure is the same for each error. Otherwise, you can configure a different Fault transformation for each error message that you want to return to a web service client.
For example, you configure a Fault transformation to return messages to the web service client when an employee is not found in a lookup. You pass an error number to the faultcode element and an error message to the faultstring element. You also need to return the department ID and the employee ID to the web service client. When you define the fault, you add the DeptID and EmployeeID elements in the detail group.
The Data Integration Service might return the following fault:
<infasoapns:Envelope xmlns:infasoapns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:infawsdlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://www.informatica.com/dis/ws/Get_Employee_Info_Web_Service"> <infasoapns:Body> <infasoapns:Fault> <faultcode>ERR_12345</faultcode> <faultstring>Web service failed to retrieve employee information.</faultstring> <detail> <tns:Employee_Not_Found> <tns:DeptID>100</tns:DeptID> <tns:EmployeeID>2428/tns:EmployeeID> </tns:Employee_Not_Found> </detail> </infasoapns:Fault> </infasoapns:Body> </infasoapns:Envelope>
The example uses SOAP 1.1.

0 COMMENTS

We’d like to hear from you!