[Carbon-dev] ESB Service Chaining - The easy way

Kasun Indrasiri kasun at wso2.com
Sun Feb 13 22:22:04 PST 2011


FYI.

With the recent changes in synapse core[1] now we handle service chaining
scenarios with less complexity with ESB.
Here is an example, where we have a service chain of 2 services. (We can
specify the receiving sequence while sending.)

<definitions xmlns="http://ws.apache.org/ns/synapse">
    <proxy name="HCProxy">
        <target>
            <inSequence>
                <!--Create the message to be sent to the SERVICE-I and
replace SOAPBody with it-->


                <!--Sending by specifying the receiving seq-->
                <send receive="HCSeq">
                    <endpoint>
                        <address uri="
http://localhost:9764/services/GeoService/"/>
                    </endpoint>
                </send>
            </inSequence>
            <outSequence>
                <log/>
            </outSequence>
        </target>
    </proxy>


    <sequence name="HCSeq">
        <log>
            <property name="MSG_FLOW" value="HCSeq"/>
        </log>


        <!--Create the message to be sent to the SERVICE-II and replace
SOAPBody with it-->


        <!--Sending by specifying the receiving seq-->
        <send receive="ClientOutSeq">
            <endpoint name="HealthCareEP">
                <address uri="http://localhost:9764/services/GeoHCService/
"/>
            </endpoint>
        </send>
    </sequence>


    <sequence name="ClientOutSeq">
        <log level="full"/>
        <!--Send Back-->
        <send/>
    </sequence>


</definitions>


[1] https://issues.apache.org/jira/browse/SYNAPSE-593

(Full working config attached)

Thanks.
-- 
Kasun Indrasiri
Senior Software Engineer
WSO2, Inc.; http://wso2.com
lean.enterprise.middleware

cell: +94 71 536 4128
Blog : http://kasunpanorama.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.wso2.org/pipermail/carbon-dev/attachments/20110214/e819e43e/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ServiceIntegratoin_Synapse.xml
Type: text/xml
Size: 4019 bytes
Desc: not available
URL: <http://mail.wso2.org/pipermail/carbon-dev/attachments/20110214/e819e43e/attachment-0001.bin>


More information about the Carbon-dev mailing list