...
- Download and install WSO2 ESB from http://wso2.com/products/enterprise-service-bus. For a list of prerequisites and step-by-step installation instructions, refer to Installation Guide in the WSO2 ESB documentation.
- Start two Sample Axis2 server instances in ports 9000 and 9001. For instructions, refer to the section Setting up the ESB Samples - Starting the Axis2 server in the WSO2 ESB documentation.
...
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://ws.apache.org/ns/synapse">
<proxy name="ComposedMessageProxy" startOnLoad="true">
<target>
<inSequence>
<log level="full"/>
<iterate xmlns:m0="http://services.samples"
preservePayload="true"
attachPath="//m0:getQuote"
expression="//m0:getQuote/m0:request">
<target>
<sequence>
<switch xmlns:m1="http://services.samples/xsd" source="//m1:symbol">
<case regex="IBM">
<send>
<endpoint>
<address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
</endpoint>
</send>
</case>
<case regex="WSO2">
<send>
<endpoint>
<address uri="http://localhost:9001/services/SimpleStockQuoteService"/>
</endpoint>
</send>
</case>
<default>
<drop/>
</default>
</switch>
</sequence>
</target>
</iterate>
</inSequence>
<outSequence>
<aggregate>
<completeCondition>
<messageCount/>
</completeCondition>
<onComplete xmlns:m0="http://services.samples" expression="//m0:getQuoteResponse">
<send/>
</onComplete>
</aggregate>
</outSequence>
</target>
<publishWSDL uri="file:repository/samples/resources/proxy/sample_proxy_1.wsdl"/>
</proxy>
<sequence name="fault">
<log level="full">
<property name="MESSAGE" value="Executing default "fault" sequence"/>
<property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
<property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
</log>
<drop/>
</sequence>
<sequence name="main">
<log/>
<drop/>
</sequence>
</definitions> |
...