This documentation is for WSO2 Enterprise Service Bus version 4.7.0 . View documentation for the latest release.
Skip to end of metadata
Go to start of metadata

This example uses the XQuery mediator to perform transformations and behaves the same as Sample 8 . The only difference is that this sample uses XQuery instead of XSLT for transformation.

  <!-- Introduction to the XQuery mediator -->
<definitions xmlns="">

    <!-- the SimpleURLRegistry allows access to a URL based registry (e.g. file:/// or http://) -->
    <registry provider="org.wso2.esb.registry.ESBRegistry">
        <!-- the root property of the simple URL registry helps resolve a resource URL as root + key -->
        <parameter name="root">file:repository/samples/resources/</parameter>
        <!-- all resources loaded from the URL registry would be cached for this number of milli seconds -->
        <parameter name="cachableDuration">15000</parameter>

    <localEntry key="xquery-key-req"
    <proxy name="StockQuoteProxy">
                <xquery key="xquery-key-req">
                    <variable name="payload" type="ELEMENT"/>
                        <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
                    <xquery key="xquery/xquery_res.xq">
                        <variable name="payload" type="ELEMENT"/>
                        <variable name="code" type="STRING"
                        <variable name="price" type="DOUBLE"
        <publishWSDL uri="file:repository/samples/resources/proxy/sample_proxy_1.wsdl"/>

Execute the custom quote client as 'ant stockquote -Dmode=customquote ...'

ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy -Dmode=customquote 
  • No labels