Table of Contents

Search

  1. Preface
  2. Web Services
  3. WSDL Data Object
  4. Schema Object
  5. Web Service Creation
  6. Operation Mappings
  7. Parsing Web Service SOAP Messages
  8. Generating Web Service SOAP Messages
  9. Web Service Administration
  10. Web Service Consumer Transformation
  11. REST Web Service Consumer Transformation
  12. Datatype Compatibility

Web Services Guide

Web Services Guide

Generic Faults

Generic Faults

You can define a generic fault to return an error message to a web service client when an error is not defined by a fault element in the WSDL. Create a Fault transformation to return a generic error message when an error occurs in a transformation.
When you create a Fault transformation for a generic fault in a web service, you must define the operation mapping logic that returns the error condition.
When you define a Fault transformation for a generic fault, and if the operation binding is in SOAP 1.1 format, you define the data to return in the fault code, fault string, and fault actor elements. If the operation binding is in SOAP 1.2 format, you define the data to return in the code, reason, node, and role elements. You can also optionally define data to return in the detail string. The detail string is optional and has an xsd:any element. If you want to send data to the detail string, map the detail element to one of the ports defined in the web service operation. You can also add more elements in the fault message to return more information to the web service client.
You can 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. You can also create a different Fault transformation for each error message that you want to return to a web service client.
After creating a fault transformation, you cannot change the status of a generic fault or a predefined fault.