The Builder Mediator can be used to build the actual SOAP message from a message coming in to ESB through the Message Binary Relay. One usage is to use this before trying to log the actual message in case of an error. Also with the Builder Mediator ESB can be configured to build some of the messages while passing the others along.
The Builder mediator relies on the binary relay builder. The binary relay is enabled when the
Builder mediator is totally rely on binary relay builder. When binary relay is enabled (i.e. BinaryRealyBuilder and ExpandingMessageFormatter is set for various Content-Types at axis2.xml) there can be situations where we need to build the actual message for a particular Content-Type for using some other message builder (i.e text/xml - > SOAPBuilder). That is the use case of builder mediator
Info |
---|
In order to build a message using the Builder mediator, BinaryRealyBuilder should be specified as the message builder in <ESB_HOME>/repository/conf/axis2/axis2.xml file for the content type of the message. Also, the message formatter of the content type should be ExpandingMessageFormatter in the same file. It is not possible to use it as an alternative way of engaging builders/formaters to the the message flow bypassing global axis2.xml. |
...
By default, Builder Mediator uses the axis2
default Message builders for the content types. User can override those by using the optional messageBuilder
configuration. For more information, see Working with Message Builders and Formatters.
...
Code Block |
---|
<syn:builder xmlns:syn="http://ws.apache.org/ns/synapse"> <syn:messageBuilder contentType="" class="" [formatterClass=""]/> </syn:builder> |
UI Configuration
...
Excerpt | ||
---|---|---|
| ||
Description of the Builder Mediator in WSO2 ESB. |