简体   繁体   中英

WSO2 ESB Mediation flow

I was trying to implement a simple message flow with WSO2 ESB, but not very familiar with this topic:

"a consumer Client communicate with a service provider to get back a random integer number." Ideally i would like to send the random number back to the Client but also to another service.

  • I have first defined a Custom proxy (http, https protocols);
  • a InSequence: LOG mediator, Send Mediator;
  • an EndPoint of the Actual Service called "RandomNumbers" (http://localhost:8280/services/RandomNumbers)
  • an OutSequence: LOG mediator, SEND mediator
  • fault sequence: existing fault

Can someone check if this implementation is correct? many thanks

 <proxy name="ClientAskNumber" transports="https http" startOnLoad="true" trace="disable"> <target faultSequence="fault"> <endpoint> <address uri="http://localhost:8280/services/RandomNumbers"/> </endpoint> <inSequence> <log/> <send/> </inSequence> <outSequence> <log/> <send/> </outSequence> </target> </proxy> 

Corrected the configuartion..

 <proxy name="ClientAskNumber" transports="https http" startOnLoad="true"
        trace="disable">
        <target faultSequence="fault">
            <inSequence>
                <log level="full">
                    <property name="Insequence" value="***" />
                </log>
                <send>
                    <endpoint>
                        <address uri="http://localhost:8280/services/RandomNumbers" />
                    </endpoint>
                </send>
            </inSequence>
            <outSequence>
                <log level="full">
                    <property name="Outsequence" value="***" />
                </log>
                <send />
            </outSequence>
        </target>
    </proxy>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM