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 use of XQuery mediator to import external XML documents to the XQuery engine
<!-- the SimpleURLRegistry allows access to URL based registry (e.g. file:/// or http://) -->
<!-- the root property of the simple URL registry helps resolve a resource URL as root + key -->
<!-- all resources loaded from the URL registry would be cached for this number of milli seconds -->
<variable name="payload" type="ELEMENT"></variable>
<variable name="commission" type="ELEMENT" key="misc/commission.xml"></variable>
- Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000.
- Start ESB with the sample configuration 391 (i.e. wso2esb-samples -sn 391).
In this sample, data from commission.xml document is used inside XQUERY document. The stock quote price from the response and commission from the commission.xml document will be added and given as a new price .
Invoke the client as follows.
ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy