Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
languagehtml/xml
<definitions xmlns="http://ws.apache.org/ns/synapse">
    <registry provider="org.wso2.carbon.mediation.registry.ESBRegistry">
        <parameter name="root">file:repository/samples/resources/</parameter>
        <parameter name="cachableDuration">15000</parameter>
    </registry>
    <sequence name="main">
        <in>
            <send>
                <endpoint key="endpoint/dynamic_endpt_1.xml"/>
            </send>
        </in>
        <out>
            <send/>
        </out>
    </sequence>
</definitions>

4. Deploy the back-end service 'SimpleStockQuoteService' and start the Axis2 server using the instructions given in section Starting Sample Back-End Services.

...

6. Now you have a running ESB instance and a back-end service deployed. In the next section, we will send a message to the back-end service through the ESB using a sample client.

Executing the Sample

According to synapse_sample_10.xml

...

1. The sample client used here is 'Stock Quote Client' which can operate in several modes. For instructions on this sample client and its operation modes, refer to Stock Quote Client. Run the following ant command from <ESB_HOME>/samples/axis2Client directory.

...

3. Repeat the above example immediately again and notice that the endpoint is cached and reused by ESB. Similar scenario is explained in Sample 9: Introduction to Static and Dynamic Registry Resources and Using XSLT TransformationsSequences with the Registry.

4. Now, edit the <ESB_HOME>/repository/samples/resources/endpoint/dynamic_endpt_1.xml definition's address to http://localhost:9001/services/SimpleStockQuoteService. After the cache expires (in more than 15 seconds), the Registry loads the new definition of the endpoint and then . Then the messages can be seen being are routed to the second sample Axis2 server on HTTP port 9001.

...