This section explains, through an example scenario, how the Datatype Channel EIP can be implemented using the ESB profile of WSO2 EI. The following topics are covered:
Table of Contents |
---|
...
Setting up the environment
Download the Datatype_1.0Channel.0.zip
, which includes the artifacts of this sample and follow the steps in Setting up the EnvironmentSimulating a Sample Scenario.
Executing the sample
- Execute the following command to send a request using the
Stock Quote Client
to the ESB profile:ant stockquote -Dtrpurl=http://localhost:8280/services/datatype-channel-proxy -Dmode=quote
For information on theStock Quote Client
and its operation modes, go to Stock Quote Client in the WSO2 EI Documentation.
Stock Client Console output :Standard :: Stock price = $172.81050109499768
Axis2 server console output:
samples.services.SimpleStockQuoteService :: Generating quote for : IBM
ESB Profile logs:
INFO - LogMediator Messaging_Channel = STOCK_QUOTE
- Also execute the below commands, and observe the ESB profile log of the corresponding values
STOCK_QUOTE
,MARKET_ACTIVITY
andFULL_QUOTE
.ant stockquote -Dtrpurl=http://localhost:8280/services/datatype-channel-proxy -Dmode=marketactivity
ant stockquote -Dtrpurl=http://localhost:8280/services/datatype-channel-proxy -Dmode=fullquote
Stock Client Console output :Activity :: Average price = $123.67485145988432
Full :: Average price = $125.67875616729333
Axis2 server console output:
- samples.services.SimpleStockQuoteService :: Generating Market activity report for : [JLN, FDZ, EQR, XNV, RDR, CZC, LIY, ZEP, ZJX, GWO, STS, NQU, RMA, UUR, PFL, ZEF, IYU, ZLV, KTW, PUN, IOZ, PZJ, HAE, PSL, CQM, CLX, BWI, UYF, QWC, EKB, LMM, UQI, GZA, KRC, GFB, DWM, ETA, SRS, VEP, ZTS, TNE, FJF, LNV, QBY, ZIO, HBS, IIW, SNO, MMO, BTY, OGJ, OUW, CLW, OZT, MXB, HNK, FQC, VEI, BLD, LUP, PHR, JUQ, MZM, GIL, EVE, UAH, SHV, WYS, MAG, XBX, ZYB, MUX, MUO, DAM, DVR, RDF, LGB, KGS, DWP, ZAG, SDF, BSF, CTX, MKG, YTO, RRX, OVJ, MEZ, ODU, JGU, GQB, SLW, UCQ, GDI, DIO, BKV, UUQ, JES, TAZ, AAU]
samples.services.SimpleStockQuoteService :: Full quote for : IBM
ESB Profile logs:
INFO - LogMediator Messaging_Channel = MARKET_ACTIVITY
INFO - LogMediator Messaging_Channel = FULL_QUOTE