This section explains, through an example scenario, how the Selective Consumer EIP can be implemented using WSO2 ESB. The following topics are covered:
Table of Contents |
---|
...
Simulating the sample scenario
Send the following request using a SOAP client like SoapUI.
...
Let's investigate the elements of the ESB configuration in detail. The line numbers below refer to the ESB configuration shown above.
- localEntry [line 2 in ESB config] - A local registry entry with key
selective_criteria
is used to define the XML schema used for validation inside the main sequence. - validate [line 33] in ESB config] - This mediator is used to define the portion of a message used for validation. In this example, no source attribute is specified using an XPath expression, so the ESB performs the validation on the first child element of the SOAP body.
- scehma [line 34 in ESB config] - Defines which schema to use for validation. In this example, the local registry entry definition in line 2 is used.
- on-fail [line 35 in ESB config] - Defines the action to take on failure of a validation. In this example, a fault is created and the message is dropped.