This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

The Fault Mediator (also called the Makefault Mediator) transforms the current message into a fault message. However, this mediator does not send the converted message. The Send Mediator needs to be invoked to send a fault message created via the Fault mediator. The fault message's To header is set to the Fault-To of the original message (if such a header exists in the original message). You can create the fault message as a SOAP 1.1, SOAP 1.2, or plain-old XML (POX) fault.

For more information on faults and errors, see Error Handling.



Syntax

<makefault [version="soap11|soap12|pox"]>
   <code (value="literal" | expression="xpath")/>
   <reason (value="literal" | expression="xpath")>
   <node>?
   <role>?
   <detail>?
</makefault>

UI Configuration

Click on the relevant tab to view the required UI configuration pending on whether you want to create the fault message as a SOAP 1.1 fault, SOAP 1.2 fault or a plain-old XML (POX) fault.

Note

You can configure the mediator using XML. Click switch to source view in the Mediator window.

 


Examples

In the following example, the test message string value is given as the reason for the SOAP error versionMismatch.

<makefault xmlns="http://ws.apache.org/ns/synapse" version="soap11">
   <code xmlns:soap11Env="http://schemas.xmlsoap.org/soap/envelope/" value="soap11Env:VersionMismatch" />
   <reason value="test message " />
   <role></role>
</makefault>

Samples

Sample 5: Creating SOAP Fault Messages and Changing the Direction of a Message.


  • No labels