Upload
wso2
View
263
Download
8
Embed Size (px)
DESCRIPTION
-
Citation preview
Integrating with SAP, FIX and HL7with WSO2 ESB
Isuru UdanaSenior Software Engineer
Sandamal WeerasingheSoftware Engineer
Oct 2014
About WSO2๏ Global enterprise, founded in 2005 by
acknowledged leaders in XML, web services technologies, standards and open source
๏ Provides only open source platform-as-a-service for private, public and hybrid cloud deployments
๏ All WSO2 products are 100% open source and released under the Apache License Version 2.0.
๏ Is an Active Member of OASIS, Cloud Security Alliance, OSGi Alliance, AMQP Working Group, OpenID Foundation and W3C.
๏ Driven by Innovation
๏ Launched first open source API Management solution in 2012
๏ Launched App Factory in 2Q 2013
๏ Launched Enterprise Store and first open source Mobile solution in 4Q 2013
What WSO2 delivers
About the Presenters
๏ Isuru Udana Senior Software Engineer WSO2
๏ Sandamal Weerasinghe Software Engineer WSO2
Outline
• Introduction
• Support for integration with ERP systems like SAP and domain specific
protocols like FIX and HL7 in the WSO2 ESB
• Installing and configuring domain specific transports in WSO2 ESB
• Transforming and manipulating message formats with ESB
• Q & A
Background
๏ Modern Enterprises
๏ Comprised of so many systems and services
๏ Built based on open standards, custom built, acquired from a third party, part of a legacy system or any combination of these.
๏ Integration
๏ Organizations are moving away from MONOLITHIC systems.
๏ Multiple systems connected with SOA as the blueprint.
Background๏ Service Integration
Background๏ Spaghetti Integration
What about maintainability, scalability, troubleshooting and governance?
Background๏ ESB in Action
What is an ESB? ๏ An ESB is a middleware solution that enables interoperability,
among heterogeneous environments using a service oriented model.
๏ Stateless and Seamless Integration๏ Standard protocols/formats like SOAP, REST, JSON ๏ Transports like HTTP/S, JMS, TCP, VFS (and many more)
WSO2 ESB
• A lightweight, high performance ESB
• Feature rich and standards compliant
• SOAP and WS-* standards
• REST support
• Domain specific protocol support (eg: FIX, HL7)
• User friendly and highly extensible
• 100% free and open source with commercial support
Key Features - Routing
Key Features - Filtering
Key Features - Transformation
Key Features - Protocol Switch
Key Features - Load Balancing
Key Features - Quality of Service
Integrating WSO2 ESB with SAP
Introduction to SAP Adapter
Introduction to SAP Adapter
Interconnects SAP R/3 with external Systems
Introduction to SAP Adapter
๏ Enables WSO2 ESB to communicate with SAP/R3 systems
๏ Convert R3 (ie:-idoc) message format to external system message
formats.
๏ Allow QoS features
- reliability (ie:-message stores, dead-letter
channels, queues,etc)
- security
Introduction to SAP Adapter
๏ Uses popular SAP Java Connector or SAP JCO library
๏ Implemented as a transport
๏ Two modes
- IDOC
- BAPI
Use casesSending IDOC messages to SAP
Use casesReceiving IDOC messages from SAP
Use casesInvoking BAPI Functions
Use casesStore and Forward - Guaranteed Delivery
Use casesIntegrating with Multiple Systems
Configure SAP Adapter
๏ Obtain JCO middleware libraries (sapidoc3.jar and sapjco3.jar) from
from your SAP provider
๏ Copy those libraries to <ESB_HOME>/repository/components/lib
directory
๏ Copy the native SAP jco library to the system path
Installing JCO Libraries
Configure SAP Adapter
๏ Copy the SAP endpoint property files to <ESB_HOME>/repository/conf/sap
๏ Two property files
๏ *.dest - SAP endpoint properties when the ESB acts as the
client to an external SAP endpoint
๏ *.server - SAP endpoint properties when the ESB acts as the
server to an external SAP endpoint
Setting up JCO Parameters
Configure SAP Adapter
Sample *.dest File
File name : JCOCLIENT.dest
jco.client.lang=enjco.destination.peak_limit=10#required - client numberjco.client.client=405#required - sap passwordjco.client.passwd=passwordhere#required - sap usernamejco.client.user=usernamehere#required - sap system numberjco.client.sysnr=26jco.destination.pool_capacity=3#required - sap app server host should be modified as follows..sames as ghostjco.client.ashost=/H/203.143.18.246/H/155.56.49.28/H/cpccr01sap.client.RCVPOR=ZWSO2ISRsap.client.RCVPRT=LSsap.client.RCVPRN=SAP
Configure SAP Adapter
Sample *.server File
File name: JCOSERVER01.server
#required - gateway host should be modified as followsjco.server.gwhost=/H/203.143.18.246/S/3299/H/155.56.49.28/H/cpccr01jco.server.connection_count=2jco.server.progid=JCOSERVER01jco.server.gwserv=3326#required - destination propertiesjco.server.repository_destination=JCOCLIENTjco.server.name=JCOSERVER01jco.server.unicode=1
These parameters should be obtained from your SAP system administrator.
Configure SAP Adapter
๏ SAP adapter was written as a new transport for the WSO2 ESB.
๏ This transport consists of two parts as follows.
- BAPI/RFC transport
- IDoc transport
Configure transports
Configure SAP Adapter
๏ Enable transports in axis2.xml
- For IDOC transport
Transport Sender
<transportSender name=”idoc” class="org.wso2.carbon.transports.sap.SAPTransportSender"/>
Transport Listener
<transportReceiver name=”idoc” class="org.wso2.carbon.transports.sap.SAPTransportListener"/>
Configure transports
Configure SAP Adapter
๏ Enable transports in axis2.xml
- For BAPI transport
Transport Sender
<transportSender name="bapi" class="org.wso2.carbon.transports.sap.SAPTransportSender"/>
Transport Listener
<transportReceiver name="bapi" class="org.wso2.carbon.transports.sap.SAPTransportListener"/>
Configure transports
Configuring ESB Artifacts
<proxy xmlns="http://ws.apache.org/ns/synapse" name="idoc_proxy" transports="idoc" startOnLoad="true" trace="disable">
<target>
<inSequence>
<log level="full"/>
<drop/>
</inSequence>
</target>
<parameter name="transport.sap.enableTIDHandler">enabled</parameter>
<parameter name="transport.sap.serverName">JCOSERVER01</parameter>
<parameter name="transport.sap.enableErrorListener">enabled</parameter>
</proxy>
Receive IDOCs from SAP system
Configuring ESB Artifacts
<proxy xmlns="http://ws.apache.org/ns/synapse" name="BAPIProxy" transports="http"
startOnLoad="true" trace="disable">
<target>
<inSequence>
<payloadFactory media-type="xml">
<format>
<bapirfc xmlns="" name="STBAPI_COMPANYCODE_GETLI"/>
</format>
</payloadFactory>
<send>
<endpoint>
<address uri="bapi:/JCOCLIENT"/>
</endpoint>
</send>
</inSequence>
</target>
</proxy>
Invoke BAPI functions
WSO2 ESB and FIX
Introduction to FIX
๏ Initiated in 1992 for equity trading between 'Fidelity Investment'
and 'Salomon Brothers'
๏ Governed by fixprotocol.org
๏ Is a session oriented communication protocol
https://openclipart.org/detail/170148/stock-quote-graph-by-jhnri4
FIX Format
๏ Contains a header, a body and a trailer
๏ Header contains three fields: 8 (BeginString), 9 (BodyLength), and
35 (MsgType).
8=FIX.4.0
<SOH>9=105<SOH>35=D<SOH>34=2<SOH>49=BANZAI<SOH>52=20080711-
06:42:26<SOH>56=SYNAPSE<SOH>
11=1215758546278<SOH>21=1<SOH>38=1000<SOH>40=1<SOH>54=1<SOH
>55=DELL<SOH>59=0<SOH>10=253
FIX transport of WSO2 ESB
๏ Based on the Quickfix/J FIX engine
๏ WSO2 FIX transport consists of a receiver and a sender
Bridge FIX to HTTP
Switch from FIX to JMS
Switch from JMS to FIX
Switch between FIX Versions
CBR (Content Based Routing)
WSO2 ESB and HL7
๏ A messaging standard for the exchange, integration, sharing and retrieval of electronic health information
๏ Non XML
๏ Human readable (ASCII)
๏ Uses segments and one character delimiters
๏ Widely adopted in the Health Care Information Services Industry around the World
๏ Minimum Lower Layer Protocol
HL7 Message Format
๏ HL7 Feature
๏ MLLP based Transport
๏ HL7 Proxy / Endpoint
๏ Supports HL7 2.x Standard Messages
๏ Transformation๏ HL7 EDI (application/edi-hl7)๏ XML
๏ HL7 Message Validation and Conformance Profile Support
HL7 Support of WSO2 ESB
๏ HL7 Proxy ๏ MLLP Transport ๏ Capable of listening for HL7 messages
๏ Incoming messages converted into SOAP equivalent๏ Can manipulate HL7 message using all available ESB mediators
๏ HL7 Endpoint ๏ Capable of sending messages to HL7 receivers
๏ Processing HL7 messages from file system (using VFS)
Exchanging HL7 Messages
๏ Immediate ACK
HL7 Message Flows
Client ESB HL7 Proxy Server
1
<proxy>...<parameter name="transport.hl7.AutoAck">true</parameter></proxy>
๏ Immediate ACK
HL7 Message Flows
Client ESB HL7 Proxy Server
1
2 ACK
<proxy>...<parameter name="transport.hl7.AutoAck">true</parameter></proxy>
๏ Immediate ACK
HL7 Message Flows
Client ESB HL7 Proxy Server
1
2 ACK3
<proxy>...<parameter name="transport.hl7.AutoAck">true</parameter></proxy>
๏ Application ACK
HL7 Message Flows
Client ESB HL7 Proxy Server
1
<proxy>...<parameter name="transport.hl7.AutoAck">false</parameter><inSequence>...<property name="HL7_APPLICATION_ACK" value="true" scope="axis2"/>
</inSequence> </proxy>
๏ Application ACK
HL7 Message Flows
Client ESB HL7 Proxy Server
12
<proxy>...<parameter name="transport.hl7.AutoAck">false</parameter><inSequence>...<property name="HL7_APPLICATION_ACK" value="true" scope="axis2"/>
</inSequence> </proxy>
2
๏ Application ACK
HL7 Message Flows
Client ESB HL7 Proxy Server
12
3 ACK
<proxy>...<parameter name="transport.hl7.AutoAck">false</parameter><inSequence>...<property name="HL7_APPLICATION_ACK" value="true" scope="axis2"/>
</inSequence> </proxy>
2
Transforming and manipulating message formats with ESB
Transforming Message Formats
๏ Payload Factory Mediator
๏ XSLT Mediator
๏ Script Mediator
๏ Smooks Mediator
๏ Enrich Mediator
Transformation Mediators
๏ For simple transformations
๏ Replaces the contents of a message
๏ Payload formats - XML or JSON
Payload Factory Mediator
Payload Factory Mediator<p:getquote xmlns:p="http://services.
samples">
<p:request>
<p:symbol>WSO2</p:symbol>
</p:request>
</p:getquote>
<p:getquote xmlns:p="http://services.
samples">
<p:request>
<p:code>WSO2</p:code>
</p:request>
</p:getquote>
<payloadFactory media-type="xml">
<format>
<m:getQuote xmlns:m="http://services.samples">
<m:request>
<m:symbol>$1</m:symbol>
</m:request>
</m:getQuote>
</format>
<args>
<arg xmlns:m0="http://services.samples" expression="//m0:Code"/>
</args>
</payloadFactory>
INPUT OUTPUT
CONFIG
๏ For advanced transformations
๏ Transforms using a XSLT script
XSLT Mediator
QnA
Business Model
Contact us !