real world scenarios with the wso2 esb. three real world scenarios in some detail 1. xml...
TRANSCRIPT
![Page 1: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/1.jpg)
Real world scenarios with the WSO2 ESB
![Page 2: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/2.jpg)
Three real world scenarios in some detail 1. XML transformation and message
augmentation 2. Financial services case – reading
legacy files and integrating with JMS 3. The PushMePullYou – using polling
to integrate two services
![Page 3: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/3.jpg)
XML Transformation of messages with Database augmentation
This example illustrates how a database table lookup can be used to augment and transform the message payload, using XSLT transformations
Objective
![Page 4: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/4.jpg)
![Page 5: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/5.jpg)
Configure the external database access
Specify SQL and map parameters, and results
Transform using XSLT
![Page 6: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/6.jpg)
![Page 7: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/7.jpg)
![Page 8: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/8.jpg)
![Page 9: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/9.jpg)
Scenario – Financial Security blocking
Database
legacyflat file
NEW YORK
Existing System
WSO2 ESBPoll
Record->XMLXML->XML
Send
LONDON
WSO2 ESBSplit/Iterate
DBLookup/FilterTransform to MQ
Send
Existing System
XML/JMS
![Page 10: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/10.jpg)
Overall ESB flow
FileSystemListener
NY Sequence
Log
Out-Only
Flatpack
E4X
Send to London
LondonEndpoint
LondonSequence
Iterate
DBReport – log whole msg
Filter/Drop NOAC
Send
![Page 11: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/11.jpg)
Proxies
![Page 12: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/12.jpg)
New York – File System Listener
![Page 13: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/13.jpg)
New York Sequence
![Page 14: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/14.jpg)
Flatpack Mediatorhttp://esbsite.org/resources.jsp?path=/mediators/paulfremantle/FlatPackMediator <class name="org.apache.synapse.mediators.contrib.FlatPackMediator"> <property name="ParserType" value="records_config"/> <property name="config"><PZMAP xmlns=""> <COLUMN name="INDICATOR" length="2"/> <RECORD id="D6" startPosition="1" endPosition="2" indicator="D6"> <COLUMN name="INDICATOR" length="2" /> <COLUMN name="ACTIONKEY" length="16" /> <COLUMN name="NA1" length="5" /> <COLUMN name="ACCNUM" length="15" /> <COLUMN name="ACTTYPE" length="6" /> <COLUMN name="SECID" length="12" /> <COLUMN name="SECIDTYPE" length="3" /> <COLUMN name="REGCODE" length="5" /> <COLUMN name="NA2" length="56" /> <COLUMN name="ONVF" length="3" /> <COLUMN name="NA3" length="244" /> <COLUMN name="UNITSEL" length="22" /></RECORD></PZMAP> </property></class>
![Page 15: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/15.jpg)
Transforming using E4X
![Page 16: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/16.jpg)
Scripting XML with E4X<script language="js"><![CDATA[ var rowset = mc.getPayloadXML() /* use the default namespace from the Flatpack mediator */ var ns = new Namespace("http://ws.apache.org/synapse/ns/rowset");
/* find all the D6 rows */ var d6 = rowset..ns::row.(@recordname=="D6"); /* create a holder element for the <FEED> elements */ var output = <FEEDS/>
for (var i=0; i<d6.length(); i++) { var row = d6[i]; /* lookup the important data */ var ActionKey = row.ns::entry.(@name=="ACTIONKEY").text(); var AccNum = row.ns::entry.(@name=="ACCNUM").text(); var ActType = row.ns::entry.(@name=="ACTTYPE").text(); var SecID = row.ns::entry.(@name=="SECID").text(); var SecIDType = row.ns::entry.(@name=="SECIDTYPE").text(); var ONVF = row.ns::entry.(@name=="ONVF").text(); var UnitsEl = row.ns::entry.(@name=="UNITSEL").text(); var RegCode = row.ns::entry.(@name=="REGCODE").text();
![Page 17: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/17.jpg)
Scripting XML continued
var feed = <FEED> <ActionKey>{ActionKey}</ActionKey> <AccountNumber>{AccNum}</AccountNumber> <ActionType>{AccType}</ActionType> <SecurityID>{SecID}</SecurityID> <SecurityIDType>{SecIDType}</SecurityIDType> <ONVF>{ONVF}</ONVF> <UnitsElected>{UnitsEl}</UnitsElected> <RegCode>{RegCode}</RegCode> </FEED>; output.appendChild(feed); } mc.setPayloadXML(output); ]]> </script>
![Page 18: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/18.jpg)
London - Iterate
![Page 19: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/19.jpg)
Log the whole message
![Page 20: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/20.jpg)
Final steps
![Page 21: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/21.jpg)
PushMePullYou
![Page 22: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/22.jpg)
Pull n Push scenario
![Page 23: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/23.jpg)
Task Configurationspecify the taskimplementation
taskproperties
task scheduler configuration
![Page 24: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/24.jpg)
Calling the data service
external data service endpoint
configuration
![Page 25: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/25.jpg)
Calling Clearance Servicesplit the message into number of messages
transform the individual messages
clearance service
endpoint
![Page 26: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/26.jpg)
Clearance Responsetransform the responses
from the clearance service
aggregate the responses from the clearance into one
response
![Page 27: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/27.jpg)
Summary
Covered a set of useful casesChanging the flow of control Iteration and AggregationTwo ways of transforming XMLReading record formats Integrating with File-based systemsDBReport and DBLookup
![Page 28: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/28.jpg)
Questions
![Page 29: Real world scenarios with the WSO2 ESB. Three real world scenarios in some detail 1. XML transformation and message augmentation 2. Financial services](https://reader035.vdocuments.net/reader035/viewer/2022062305/56649e2e5503460f94b1e912/html5/thumbnails/29.jpg)
Resources WSO2 Webinars
http://wso2.on.intercall.com WSO2 ESB documentation
http://wso2.org/project/esb/java/1.7/docs/docs_index.html
User [email protected]
Recent performance testinghttp://wso2.org/library/3740