You can optionally create a fault to send user-defined errors within the SOAP response. When you create a predefined fault, the Developer tool adds a Fault transformation to the operation mapping.
Create a web service and define one or more operations. You can create a fault when you create an operation or you can add a fault to an operation. An operation can have multiple faults.
Open a web service.
In the
Outline
view, select the operation mapping.
The operation mapping appears in the editor.
Click the
Operation
tab in the
Properties
view.
Click the arrow next to the
New
button.
Click
Fault
.
Choose to create an element or reuse an element.
Select
Create New Element
to create an element for the fault. You can create child elements and multiple-occurring elements.
Select
Reuse Existing Element
to reuse an element for the fault.
The Developer tool adds elements to the detail element in the fault message hierarchy.