Versions Compared

Key

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

This section explains, through an example scenario, how the Normalizer EIP can be implemented using WSO2 ESB. The following topics are covered:

Table of Contents

...

Simulating the sample scenario

 You can test this configuration for JSON, SOAP, and POX messages using the sample Axis2 client that comes with WSO2 ESB. You can find examples below.

...

Let's investigate the elements of the ESB configuration in detail. The line numbers below are mapped with the ESB configuration shown above.

  • filter [line 11 13 in ESB config] - The Filter mediator looks for a particular XPath expression inside the request message. If the expression evaluates successfully, it is assumed to be a SOAP or POX message, and the mediation continues through the sequence sendSeq. If the expression does not evaluate, it is assumed to be a JSON message, and the mediation continues via the jsonInTransformSeq sequence. 
  • localEntry [line 33 35 in ESB config] - The local entry holds an XSLT transformation that converts JSON requests to XML. 
  • xslt [line 51 53 in ESB config] - The XSLT mediator applies the defined XSLT to the payload. 
  • address [line 60 62 in ESB config] - The address element of the endpoint mediator defines the back-end service and the message format that back-end service prefers. This format is used to normalize a message further, but only when there can be a 1-to-1 mapping between two different formats, for example, between SOAP 1.1 and SOAP 1.2.