Versions Compared

Key

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

Insert excerpt
ESB Profile Samples
ESB Profile Samples
nopaneltrue

Objective: Demonstrate the ability of theĀ URL Rewrite mediator /wiki/spaces/EI6xx/pages/49612817 to perform rewrites based on multiple rules.

...

Prerequisites:

  • Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000.
  • Create the above configuration and deploy it in the WSO2 EI profile, seeĀ Working with WSO2 Integration Studio.

Invoke the Axis2 client as follows.

Code Block
ant stockquote -Dtrpurl=http://localhost:8280 -Daddurl=http://test.com/SimpleStockQuoteService

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.

...