Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

  1. Execute the following command to send a request using theStock Quote Client to the ESB profile:
    ant stockquote -Dtrpurl=http://localhost:8280/services/datatype-channel-proxy -Dmode=quote
    For information on the Stock 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

  2. Also execute the below commands, and observe the ESB profile log of the corresponding values STOCK_QUOTE, MARKET_ACTIVITY and FULL_QUOTE
    Notice the following respective output.

    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