Message Relay has two main parts:
- Axis2 Message builder - Is used to build an incoming message to the ESB.
- Axis2 Message formatter - Is used to build the outgoing stream from the message inside ESB.
In a typical ESB routing scenario, here is the flow:
When Relay Message builder and formatter are specified for a content type, message coming with that content type will not be built by the ESB. Instead they will pass through the ESB as it is.
Message builders and formatters are specified in the axis2.xml
under messageBuilders
and messageFormatters
configuration section. Message builders and formatters are chosen basing on the content type of the message.
ESB has few default Message builders. Even if the user does not specify them in the axis2.xml,
they will take effect. These can be overridden using the Message builder configurations in the axis2.xml.
ESB does not have default Message formatters. So it is important to specify all of them in the axis2.xml
configuration.
The Default Message Builders
application/soap+xml |
org.apache.axis2.builder.SOAPBuilder |
multipart/related |
org.apache.axis2.builder.MIMEBuilder |
text/xml |
org.apache.axis2.builder.SOAPBuilder |
application/xop+xml |
org.apache.axis2.builder.MTOMBuilder |
application/xml |
org.apache.axis2.builder.ApplicationXMLBuilder |
application/x-www-form-urlencoded |
org.apache.axis2.builder.XFormURLEncodedBuilder |