Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Builder Mediator can be used to build the actual SOAP message from a message coming in to ESB through the 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.

Info

In order to build a message using use the Builder mediator, BinaryRealyBuilder should  should be specified as the message builder in <ESBin the <ESB_HOME>/repository/conf/axis2/axis2.xml file for the xml file for at least one content type of the message. Also, the . The message formatter of specified for the same content type types should be ExpandingMessageFormatter. Unlike other message builders defined 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.axis2.xml, the BinaryRelayBuilder works by passing through a binary stream of the received content. The Builder mediator is used in conjunction with the BinaryRelayBuilder when we require to build the binary stream into a particular content type during mediation. We can specify which message builder should be used to build the binary stream using the Builder mediator. 

By default, Builder Mediator uses the the axis2 default  default Message builders for the content types. User can override those by using the optional optional messageBuilder configuration configuration. For more information, see Working with Message Builders and Formatters.

Like in in axis2.xml user  user has to specify the content type and the implementation class of the the messageBuilder. Also user can specify the message message formatter for  for this content type. This is used by the the ExpandingMessageFormatter to  to format the message before sending to the destination.

Syntax

Code Block
<syn:builder xmlns:syn="http://ws.apache.org/ns/synapse"><builder>
        <syn:messageBuilder<messageBuilder contentType="" class="" [formatterClass=""]/>
</syn:builder>
Excerpt
hiddentrue

Description of the Builder Mediator in WSO2 ESB.