Versions Compared

Key

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

...

Message builders and formatters are specified in in <ESB_HOME>/repository/conf/axis2/axis2.xml (or <ESB_HOME>/repository/conf/axis2/tenant-axis2.xml under the messageBuilders and messageFormatters configuration sections. The  if you are working in a multi-tenant environment), under the messageBuilders and messageFormatters configuration sections.

WSO2 ESB has a few default message builders, so even if you do not specify them explicitly in in axis2.xml or tenant-axis2.xml, they will take effect when messages of those content types come into the ESB. If you want to use different builders, specify them in in axis2.xml or tenant-axis2.xml to  to override the defaults. The ESB does not have default message formatters, so it is important to specify all of them in the the axis2.xml or tenant-axis2.xml configuration configuration. Following are the default message builders:

Content typeMessage Builder

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

Using message relay

If you want to enable message relay, so that messages of a specific content type are not built or formatted but simply pass through the ESB, you can specify the message relay builder (org.wso2.carbon.relay.BinaryRelayBuilder) for that content type. For more information, see Configuring Message Relay.

...

  • In the parameters section: <parameter name="defaultContentTypeDEFAULT_REQUEST_CONTENT_TYPE" locked="false">empty>empty/content<content</parameter>
  • In the message builders section: <messageBuilder contentType="empty/content" class="org.wso2.carbon.relay.BinaryRelayBuilder"/> 
  • In the message formatters section: <messageFormatter contentType="empty/content" class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>

...