Note that WSO2 EI is shipped with the following changes to what is mentioned in this documentation:
repository/samples/directory that includes all Integration profile samples is changed to
repository/samples/resources/directory that includes all artifacts related to the Integration profile samples is changed to
Objective: Demonstrate the ability of the URL Rewrite mediator to perform rewrites based on multiple rules.
- Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000.
- Start ESB with the sample configuration 452 (i.e. wso2esb-samples -sn 452).
Invoke the Axis2 client as follows.
The provided address URL does not contain a port number and the context. The URL rewrite mediator will replace the hostname to be 'localhost' and add the context '/services' to the path. Then it will add the appropriate port number to the URL by looking at the protocol prefix. Ultimately the service request will be routed the sample Axis2 server and the client will receive a valid response. Note that the Synapse configuration does not specify any endpoints explicitly. So the messages are sent to the rewritten To header.
Another important aspect shown by this sample is the ability of the URL rewrite mediator to obtain the necessary values by executing XPath expressions. The port numbers are calculated by executing an XPath on the messages.
WSO2 ESB can be used as an event broker. It comes with a built-in eventing implementation and a lightweight event broker based on Apache Qpid. You can use the ESB management console to create event topics and clients can subscribe to those topics by sending WS-Eventing subscription requests. The management console also allows creating static subscription.
WSO2 ESB is also equipped with an event mediator which can be used to publish messages to predefined topics. With this mediator it is possible for a sequence or a proxy service to directly publish a received request or a response to a topic as an event.