SlideShare a Scribd company logo
Chanaka Fernando
Senior Technical Lead
WSO2 Inc.
WSO2 ESB internals
and advanced
concepts
Agenda
• ESB Internal Architecture
• Transports and axis2 engine
• Synapse Runtime
• Solving common integration problems
• Extending the ESB with custom code
• ESB Connectors
Source : http://bonfirehealth.com/week-13-insights-spark-integration/
ESB Internal Architecture

High level architecture
ESB Internal Architecture

Component architecture (synapse)
Transports and axis2 engine

Axis2 Transport
Transports and axis2 engine
TransportListener
Implementations of this interface should specify how incoming messages are received
and processed before handing them over to the Axis2 engine for further Processing.
TransportSender
Implementations of this interface should specify how a message can be sent out from
the Axis2 engine.
TransportReceivers and TransportSenders are registered to the server using axis2.xml
file
Same axis2.xml file can be used to define transport configuration parameters
Editing axis2.xml need to be followed by a server restart
Value of the name attribute can be used to uniquely identify
the transport with ESB
<transportReceiver name="http"
class="org.apache.synapse.transport.nhttp.HttpCoreNIOListener“/>
<transportSender name="http"
class="org.apache.synapse.transport.nhttp.HttpCoreNIOSender“/>
Transports and axis2 engine
Message Builder
Identify the message using the content type and convert it to common XML. There is a
message builder associated with each content type. WSO2 ESB includes message
builders for text-based and binary content.
Message Formatter
The opposite partners of the message builders. The formatter converts the message
back to its original format by referencing the content type just before the message
handover to the transports.
<messageBuilder contentType="application/xml"
class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
<messageFormatter contentType="application/xml"
class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
Synapse Runtime
NHTTP transport
Synapse Runtime
NHTTP transport
The key advantage of this architecture is that it enables the ESB (mediators) to intercept
all the messages and manipulate them in any way necessary.
The main downside is every message happens to go through the Axiom layer, which is
not really necessary in cases like HTTP load balancing and HTTP header-based routing.
Also the overhead of moving data from one buffer to another was not always justifiable in
this model.
The default HTTP/HTTPS transport prior to ESB 4.6.0
Synapse Runtime
Binary Relay
Synapse Runtime
Binary Relay
A Message Builder, that takes the input stream and hides it inside a fake SOAP message
without reading it, and a Message Formatter that takes the input stream and writes it
directly to a output stream.
• Builder : org.wso2.carbon.relay.BinaryRelayBuilder
• Formatter :org.wso2.carbon.relay.ExpandingMessageFormatter
The Builder Mediator can be used to build the actual SOAP message from a message
coming in to ESB through the Message Relay.
Synapse Runtime
Passthrough Transport
Synapse Runtime
Passthrough Transport
Based on a single buffer model and completely bypassed the Axiom layer.
On-demand message parsing in the mediation engine.
The default HTTP/HTTPS transport since ESB 4.6.0.
<transportSender name="http"
class="org.apache.synapse.transport.passthru.PassThroughHttpSender“/>
<transportReceiver name="http"
class="org.apache.synapse.transport.passthru.PassThroughHttpListener“/>
Synapse Runtime
Passthrough Transport high level view
Synapse Runtime
Passthrough Transport state machine
Solving common integration problems
Message Transformations
• Possible to add , remove , edit elements in the
payload.
• Possible to transform into entirely different
message or different content type.
XML = > XML
XML => JSON
Mediators
XSLT
XQuery
PaylodFactory
Smooks
Enrich
Use mediators like XSLT and XQuery in
complex transformation.
• Payload Factory and Enrich mediator perform
better in simple transformation scenarios
Solving common integration problems
XML->JSON
<proxy name="JSONTempProxy">
<target>
<outSequence>
<property name="messageType" value="application/json" scope="axis2"/>
<send/>
</outSequence>
<endpoint>
<address uri=“...."/>
</endpoint>
</target>
</proxy>
Solving common integration problems
Message Validation
Solving common integration problems
Message Validation
<validate>
<schema key="temp-msg.xsd"/>
<on-fail>
<makefault version="soap11">
<code xmlns:tns="http://www.w3.org/2003/05/soap-
envelope" value="tns:Receiver"/>
<reason value="Invalid Request!!!"/>
</makefault>
<property name="RESPONSE" value="true"/>
<header name="To" action="remove"/>
<send/>
</on-fail>
</validate>
Solving common integration problems
Service Chaining
Extending ESB with custom code
Scheduler Task
MessageInjector
Default Task implementation
Inject messages into “Main” flow
Support simple scheduling and cron statements
Support for JavaBean like property settings
import org.apache.synapse.ManagedLifecycle;
import org.apache.synapse.task.Task;
public class HelloWorldTask implements Task , ManagedLifecycle
{
private String message;
public String getMessage () {
}
public void setMessage(String message) { }
}
Extending ESB with custom code
Extending the ESB with Class mediator
Messages coming in to ESB can be processed from custom java code
Class mediator gets the same privilege as an internal ESB mediator
Needs to implement AbstractMediator interface
Parameters can be passed through setter methods
Message can be altered inside the mediate method through MessageContext object
Can be built as a jar file or as an osgi bundle
Extending ESB with custom code
Extending the ESB with Class mediator
import javax.xml.namespace.QName;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.synapse.MessageContext;
import org.apache.synapse.mediators.AbstractMediator;
public class DiscountQuoteMediator extends AbstractMediator {
public boolean mediate(MessageContext mc) {
String price = mc.getEnvelope().getBody().getFirstElement().getFirstElement().
getFirstChildWithName(new QName("http://services.samples/xsd",
"last")).getText();
System.out.println("Original price: " + price);
System.out.println("Discounted price: " + discountedPrice);
return true;
}
public void setTraceState(int traceState) {
traceState = 0;
}
public int getTraceState() {
return 0;
ESB Connectors
A connector is a ready made and convenient tool to reach publicly available web API’s.
Simplified configuration to access external api
‘Cloud to Cloud’ and ‘Cloud to Enterprise’ Integration
On premise integration
Connecting with systems located in your enterprise perimeter Ex: SAP, Database,
SOAP/REST web service
Can be proprietary/ legacy systems
Security is a less concern when connecting with these systems
Performance is a critical factor for business success
Cloud integration
Connecting with a publicly available cloud APIs
Ex: Twitter, Salesforce, Google Spreadsheet
Security needs to be handled carefully when connecting to public APIs
Performance is not critical when connecting to cloud APIs
Configuration driven approach to perform different operations on the cloud platform
ESB Connectors
Use Case I – Connect to cloud API and extract data
ESB Connectors
Use Case II – Cloud to Cloud integration
ESB Connectors
Use Case III – On premise to cloud integration
soa
p
ESB Connectors
Writing a custom connector to public API
A connector is a collection of templates that define operations users can call from their
ESB configurations to easily access specific logic for processing messages.
Typically, connectors are used to wrap the API of an external service. For example,
there are several default connectors provided with the ESB that call the APIs of services
like Twitter and JIRA.
Creating a connector involves the following high-level tasks:
Research the APIs provided by the service for which you want to create a connector.
Decide which API you are going to use to write the connector. For example, JIRA
provides a REST API and Java API. If you choose the REST API, you can create your
connector and operations entirely from XML configuration files. If you choose a Java
API, you create XML configuration files that define your connector and point to your
Java classes that define the operations.
Use the connector core libraries to write your connector.
After you create the files, you package them in a ZIP file, which you can then add to
an ESB instance.
ESB Connectors
Writing a custom connector to public API
Here are some useful resources for step by step guides to write a connector for a public
API
http://chanakaindrajith.blogspot.com/2014/04/getting-started-with-wso2-esb-
connectors.html
https://docs.wso2.com/display/ESB481/Creating+a+Connector
http://wso2.com/library/articles/2014/02/how-to-write-a-esb-connector/
Questions
Thank You

More Related Content

What's hot

Exchange 2013 Migration & Coexistence
Exchange 2013 Migration & CoexistenceExchange 2013 Migration & Coexistence
Exchange 2013 Migration & Coexistence
Microsoft Technet France
 
Wso2 esb 5.0.0 product release webinar
Wso2 esb 5.0.0   product release webinarWso2 esb 5.0.0   product release webinar
Wso2 esb 5.0.0 product release webinar
Chanaka Fernando
 
Overview of Mule
Overview of MuleOverview of Mule
Overview of Mule
mdfkhan625
 
IBM WebSphere MQ Introduction
IBM WebSphere MQ Introduction IBM WebSphere MQ Introduction
IBM WebSphere MQ Introduction
ejlp12
 
Mule concepts components
Mule concepts componentsMule concepts components
Mule concepts components
kunal vishe
 
WSDL in Mule Esb
WSDL in Mule EsbWSDL in Mule Esb
WSDL in Mule Esb
Anand kalla
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)
Peter R. Egli
 
Microsoft Exchange Technology Overview
Microsoft Exchange Technology OverviewMicrosoft Exchange Technology Overview
Microsoft Exchange Technology Overview
Mike Pruett
 
Mulesoft ppt
Mulesoft pptMulesoft ppt
Mulesoft ppt
Achyuta Lakshmi
 
Exl393 exchange 2013 architecture schnoll (rm221)
Exl393 exchange 2013 architecture schnoll (rm221)Exl393 exchange 2013 architecture schnoll (rm221)
Exl393 exchange 2013 architecture schnoll (rm221)Khalid Al-Ghamdi
 
Rabbit mq in mule
Rabbit mq in muleRabbit mq in mule
Rabbit mq in mule
himajareddys
 
Mule rabbit mq
Mule rabbit mqMule rabbit mq
Mule rabbit mq
D.Rajesh Kumar
 
Anypoint connector dev kit
Anypoint connector dev kitAnypoint connector dev kit
Anypoint connector dev kit
Son Nguyen
 
SMTP MULE
SMTP  MULESMTP  MULE
SMTP MULE
Rajkumar Epari
 
Exchange Server 2013 Architecture Deep Dive, Part 1
Exchange Server 2013 Architecture Deep Dive, Part 1Exchange Server 2013 Architecture Deep Dive, Part 1
Exchange Server 2013 Architecture Deep Dive, Part 1
Microsoft TechNet - Belgium and Luxembourg
 
Mule rabbitmq
Mule rabbitmqMule rabbitmq
Mule rabbitmq
Praneethchampion
 
Core concepts in mule
Core concepts in muleCore concepts in mule
Core concepts in mule
Sindhu VL
 
Mule soa
Mule soaMule soa
Mule soa
D.Rajesh Kumar
 
Core concepts - mule
Core concepts - muleCore concepts - mule
Core concepts - mule
Sindhu VL
 
Exchange 2013 Architecture Details
Exchange 2013 Architecture DetailsExchange 2013 Architecture Details
Exchange 2013 Architecture DetailsHuy Phạm
 

What's hot (20)

Exchange 2013 Migration & Coexistence
Exchange 2013 Migration & CoexistenceExchange 2013 Migration & Coexistence
Exchange 2013 Migration & Coexistence
 
Wso2 esb 5.0.0 product release webinar
Wso2 esb 5.0.0   product release webinarWso2 esb 5.0.0   product release webinar
Wso2 esb 5.0.0 product release webinar
 
Overview of Mule
Overview of MuleOverview of Mule
Overview of Mule
 
IBM WebSphere MQ Introduction
IBM WebSphere MQ Introduction IBM WebSphere MQ Introduction
IBM WebSphere MQ Introduction
 
Mule concepts components
Mule concepts componentsMule concepts components
Mule concepts components
 
WSDL in Mule Esb
WSDL in Mule EsbWSDL in Mule Esb
WSDL in Mule Esb
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)
 
Microsoft Exchange Technology Overview
Microsoft Exchange Technology OverviewMicrosoft Exchange Technology Overview
Microsoft Exchange Technology Overview
 
Mulesoft ppt
Mulesoft pptMulesoft ppt
Mulesoft ppt
 
Exl393 exchange 2013 architecture schnoll (rm221)
Exl393 exchange 2013 architecture schnoll (rm221)Exl393 exchange 2013 architecture schnoll (rm221)
Exl393 exchange 2013 architecture schnoll (rm221)
 
Rabbit mq in mule
Rabbit mq in muleRabbit mq in mule
Rabbit mq in mule
 
Mule rabbit mq
Mule rabbit mqMule rabbit mq
Mule rabbit mq
 
Anypoint connector dev kit
Anypoint connector dev kitAnypoint connector dev kit
Anypoint connector dev kit
 
SMTP MULE
SMTP  MULESMTP  MULE
SMTP MULE
 
Exchange Server 2013 Architecture Deep Dive, Part 1
Exchange Server 2013 Architecture Deep Dive, Part 1Exchange Server 2013 Architecture Deep Dive, Part 1
Exchange Server 2013 Architecture Deep Dive, Part 1
 
Mule rabbitmq
Mule rabbitmqMule rabbitmq
Mule rabbitmq
 
Core concepts in mule
Core concepts in muleCore concepts in mule
Core concepts in mule
 
Mule soa
Mule soaMule soa
Mule soa
 
Core concepts - mule
Core concepts - muleCore concepts - mule
Core concepts - mule
 
Exchange 2013 Architecture Details
Exchange 2013 Architecture DetailsExchange 2013 Architecture Details
Exchange 2013 Architecture Details
 

Viewers also liked

Esb 4.9.0 release webinar
Esb 4.9.0 release webinarEsb 4.9.0 release webinar
Esb 4.9.0 release webinar
Chanaka Fernando
 
Wso2 esb-rest-integration
Wso2 esb-rest-integrationWso2 esb-rest-integration
Wso2 esb-rest-integration
Chanaka Fernando
 
Managing ESB artifacts with the WSO2 Governance Registry
Managing ESB artifacts with the WSO2 Governance Registry Managing ESB artifacts with the WSO2 Governance Registry
Managing ESB artifacts with the WSO2 Governance Registry WSO2
 
WSO2 IoT Server - Product Overview
WSO2 IoT Server - Product OverviewWSO2 IoT Server - Product Overview
WSO2 IoT Server - Product Overview
WSO2
 
WSO2Con ASIA 2016: WSO2 IoT Server: Your Foundation for the Internet of Things
WSO2Con ASIA 2016: WSO2 IoT Server: Your Foundation for the Internet of ThingsWSO2Con ASIA 2016: WSO2 IoT Server: Your Foundation for the Internet of Things
WSO2Con ASIA 2016: WSO2 IoT Server: Your Foundation for the Internet of Things
WSO2
 
WSO2Con EU 2016: WSO2 IoT Server: Your Foundation for the Internet of Things
WSO2Con EU 2016: WSO2 IoT Server:  Your Foundation for the Internet of ThingsWSO2Con EU 2016: WSO2 IoT Server:  Your Foundation for the Internet of Things
WSO2Con EU 2016: WSO2 IoT Server: Your Foundation for the Internet of Things
WSO2
 
Reference architecture for Internet of Things
Reference architecture for Internet of ThingsReference architecture for Internet of Things
Reference architecture for Internet of Things
Sujee Maniyam
 
WSO2Con USA 2017: Providing a Pathway from Stovepipe Systems to a Secure SOA ...
WSO2Con USA 2017: Providing a Pathway from Stovepipe Systems to a Secure SOA ...WSO2Con USA 2017: Providing a Pathway from Stovepipe Systems to a Secure SOA ...
WSO2Con USA 2017: Providing a Pathway from Stovepipe Systems to a Secure SOA ...
WSO2
 
WSO2Con USA 2017: WSO2 Partner Program – Engaging with WSO2
WSO2Con USA 2017: WSO2 Partner Program – Engaging with WSO2WSO2Con USA 2017: WSO2 Partner Program – Engaging with WSO2
WSO2Con USA 2017: WSO2 Partner Program – Engaging with WSO2
WSO2
 
WSO2Con USA 2017: Integrating Systems for University of Exeter using Zero and...
WSO2Con USA 2017: Integrating Systems for University of Exeter using Zero and...WSO2Con USA 2017: Integrating Systems for University of Exeter using Zero and...
WSO2Con USA 2017: Integrating Systems for University of Exeter using Zero and...
WSO2
 
WSO2Con USA 2017: Building a Successful Delivery Team for Customer Success
WSO2Con USA 2017: Building a Successful Delivery Team for Customer SuccessWSO2Con USA 2017: Building a Successful Delivery Team for Customer Success
WSO2Con USA 2017: Building a Successful Delivery Team for Customer Success
WSO2
 
WSO2Con USA 2017: Implementing a Modern API Management Solution that Benefits...
WSO2Con USA 2017: Implementing a Modern API Management Solution that Benefits...WSO2Con USA 2017: Implementing a Modern API Management Solution that Benefits...
WSO2Con USA 2017: Implementing a Modern API Management Solution that Benefits...
WSO2
 
WSO2Con USA 2017: Building a Secure Enterprise
WSO2Con USA 2017: Building a Secure EnterpriseWSO2Con USA 2017: Building a Secure Enterprise
WSO2Con USA 2017: Building a Secure Enterprise
WSO2
 
WSO2Con USA 2017: Journey of Migration from Legacy ESB to Modern WSO2 ESB Pla...
WSO2Con USA 2017: Journey of Migration from Legacy ESB to Modern WSO2 ESB Pla...WSO2Con USA 2017: Journey of Migration from Legacy ESB to Modern WSO2 ESB Pla...
WSO2Con USA 2017: Journey of Migration from Legacy ESB to Modern WSO2 ESB Pla...
WSO2
 
WSO2Con USA 2017: IoT in Airline Operations
WSO2Con USA 2017: IoT in Airline OperationsWSO2Con USA 2017: IoT in Airline Operations
WSO2Con USA 2017: IoT in Airline Operations
WSO2
 
WSO2Con USA 2017: Multi-tenanted, Role-based Identity & Access Management sol...
WSO2Con USA 2017: Multi-tenanted, Role-based Identity & Access Management sol...WSO2Con USA 2017: Multi-tenanted, Role-based Identity & Access Management sol...
WSO2Con USA 2017: Multi-tenanted, Role-based Identity & Access Management sol...
WSO2
 
WSO2Con USA 2017: Building an Effective API Architecture
WSO2Con USA 2017: Building an Effective API ArchitectureWSO2Con USA 2017: Building an Effective API Architecture
WSO2Con USA 2017: Building an Effective API Architecture
WSO2
 
WSO2Con USA 2017: Positioning WSO2 for Quicker Uptake
WSO2Con USA 2017: Positioning WSO2 for Quicker UptakeWSO2Con USA 2017: Positioning WSO2 for Quicker Uptake
WSO2Con USA 2017: Positioning WSO2 for Quicker Uptake
WSO2
 
WSO2Con USA 2017: Enhancing Customer Experience with WSO2 Identity Server
WSO2Con USA 2017: Enhancing Customer Experience with WSO2 Identity ServerWSO2Con USA 2017: Enhancing Customer Experience with WSO2 Identity Server
WSO2Con USA 2017: Enhancing Customer Experience with WSO2 Identity Server
WSO2
 
WSO2Con USA 2017: Keynote - The Blockchain’s Digital Disruption
WSO2Con USA 2017: Keynote - The Blockchain’s Digital DisruptionWSO2Con USA 2017: Keynote - The Blockchain’s Digital Disruption
WSO2Con USA 2017: Keynote - The Blockchain’s Digital Disruption
WSO2
 

Viewers also liked (20)

Esb 4.9.0 release webinar
Esb 4.9.0 release webinarEsb 4.9.0 release webinar
Esb 4.9.0 release webinar
 
Wso2 esb-rest-integration
Wso2 esb-rest-integrationWso2 esb-rest-integration
Wso2 esb-rest-integration
 
Managing ESB artifacts with the WSO2 Governance Registry
Managing ESB artifacts with the WSO2 Governance Registry Managing ESB artifacts with the WSO2 Governance Registry
Managing ESB artifacts with the WSO2 Governance Registry
 
WSO2 IoT Server - Product Overview
WSO2 IoT Server - Product OverviewWSO2 IoT Server - Product Overview
WSO2 IoT Server - Product Overview
 
WSO2Con ASIA 2016: WSO2 IoT Server: Your Foundation for the Internet of Things
WSO2Con ASIA 2016: WSO2 IoT Server: Your Foundation for the Internet of ThingsWSO2Con ASIA 2016: WSO2 IoT Server: Your Foundation for the Internet of Things
WSO2Con ASIA 2016: WSO2 IoT Server: Your Foundation for the Internet of Things
 
WSO2Con EU 2016: WSO2 IoT Server: Your Foundation for the Internet of Things
WSO2Con EU 2016: WSO2 IoT Server:  Your Foundation for the Internet of ThingsWSO2Con EU 2016: WSO2 IoT Server:  Your Foundation for the Internet of Things
WSO2Con EU 2016: WSO2 IoT Server: Your Foundation for the Internet of Things
 
Reference architecture for Internet of Things
Reference architecture for Internet of ThingsReference architecture for Internet of Things
Reference architecture for Internet of Things
 
WSO2Con USA 2017: Providing a Pathway from Stovepipe Systems to a Secure SOA ...
WSO2Con USA 2017: Providing a Pathway from Stovepipe Systems to a Secure SOA ...WSO2Con USA 2017: Providing a Pathway from Stovepipe Systems to a Secure SOA ...
WSO2Con USA 2017: Providing a Pathway from Stovepipe Systems to a Secure SOA ...
 
WSO2Con USA 2017: WSO2 Partner Program – Engaging with WSO2
WSO2Con USA 2017: WSO2 Partner Program – Engaging with WSO2WSO2Con USA 2017: WSO2 Partner Program – Engaging with WSO2
WSO2Con USA 2017: WSO2 Partner Program – Engaging with WSO2
 
WSO2Con USA 2017: Integrating Systems for University of Exeter using Zero and...
WSO2Con USA 2017: Integrating Systems for University of Exeter using Zero and...WSO2Con USA 2017: Integrating Systems for University of Exeter using Zero and...
WSO2Con USA 2017: Integrating Systems for University of Exeter using Zero and...
 
WSO2Con USA 2017: Building a Successful Delivery Team for Customer Success
WSO2Con USA 2017: Building a Successful Delivery Team for Customer SuccessWSO2Con USA 2017: Building a Successful Delivery Team for Customer Success
WSO2Con USA 2017: Building a Successful Delivery Team for Customer Success
 
WSO2Con USA 2017: Implementing a Modern API Management Solution that Benefits...
WSO2Con USA 2017: Implementing a Modern API Management Solution that Benefits...WSO2Con USA 2017: Implementing a Modern API Management Solution that Benefits...
WSO2Con USA 2017: Implementing a Modern API Management Solution that Benefits...
 
WSO2Con USA 2017: Building a Secure Enterprise
WSO2Con USA 2017: Building a Secure EnterpriseWSO2Con USA 2017: Building a Secure Enterprise
WSO2Con USA 2017: Building a Secure Enterprise
 
WSO2Con USA 2017: Journey of Migration from Legacy ESB to Modern WSO2 ESB Pla...
WSO2Con USA 2017: Journey of Migration from Legacy ESB to Modern WSO2 ESB Pla...WSO2Con USA 2017: Journey of Migration from Legacy ESB to Modern WSO2 ESB Pla...
WSO2Con USA 2017: Journey of Migration from Legacy ESB to Modern WSO2 ESB Pla...
 
WSO2Con USA 2017: IoT in Airline Operations
WSO2Con USA 2017: IoT in Airline OperationsWSO2Con USA 2017: IoT in Airline Operations
WSO2Con USA 2017: IoT in Airline Operations
 
WSO2Con USA 2017: Multi-tenanted, Role-based Identity & Access Management sol...
WSO2Con USA 2017: Multi-tenanted, Role-based Identity & Access Management sol...WSO2Con USA 2017: Multi-tenanted, Role-based Identity & Access Management sol...
WSO2Con USA 2017: Multi-tenanted, Role-based Identity & Access Management sol...
 
WSO2Con USA 2017: Building an Effective API Architecture
WSO2Con USA 2017: Building an Effective API ArchitectureWSO2Con USA 2017: Building an Effective API Architecture
WSO2Con USA 2017: Building an Effective API Architecture
 
WSO2Con USA 2017: Positioning WSO2 for Quicker Uptake
WSO2Con USA 2017: Positioning WSO2 for Quicker UptakeWSO2Con USA 2017: Positioning WSO2 for Quicker Uptake
WSO2Con USA 2017: Positioning WSO2 for Quicker Uptake
 
WSO2Con USA 2017: Enhancing Customer Experience with WSO2 Identity Server
WSO2Con USA 2017: Enhancing Customer Experience with WSO2 Identity ServerWSO2Con USA 2017: Enhancing Customer Experience with WSO2 Identity Server
WSO2Con USA 2017: Enhancing Customer Experience with WSO2 Identity Server
 
WSO2Con USA 2017: Keynote - The Blockchain’s Digital Disruption
WSO2Con USA 2017: Keynote - The Blockchain’s Digital DisruptionWSO2Con USA 2017: Keynote - The Blockchain’s Digital Disruption
WSO2Con USA 2017: Keynote - The Blockchain’s Digital Disruption
 

Similar to Advaced training-wso2-esb

High Volume Web API Management with the WSO2 ESB
High Volume Web API Management with the WSO2 ESBHigh Volume Web API Management with the WSO2 ESB
High Volume Web API Management with the WSO2 ESB
Paul Fremantle
 
Integrating with SAP FIX and HL7
Integrating with SAP FIX and HL7Integrating with SAP FIX and HL7
Integrating with SAP FIX and HL7
WSO2
 
Xml web services
Xml web servicesXml web services
Xml web servicesRaghu nath
 
Web API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonWeb API or WCF - An Architectural Comparison
Web API or WCF - An Architectural Comparison
Adnan Masood
 
Web services Concepts
Web services ConceptsWeb services Concepts
Web services Concepts
pasam suresh
 
OWIN and Katana Project - Not Only IIS - NoIIS
OWIN and Katana Project - Not Only IIS - NoIISOWIN and Katana Project - Not Only IIS - NoIIS
OWIN and Katana Project - Not Only IIS - NoIIS
Bilal Haidar
 
MQ Support for z/OS Connect
MQ Support for z/OS ConnectMQ Support for z/OS Connect
MQ Support for z/OS Connect
Matt Leming
 
How to – wrap soap web service around a database
How to – wrap soap web service around a databaseHow to – wrap soap web service around a database
How to – wrap soap web service around a database
Son Nguyen
 
Lightning web components
Lightning web components Lightning web components
Lightning web components
Cloud Analogy
 
Networked APIs with swift
Networked APIs with swiftNetworked APIs with swift
Networked APIs with swift
Tim Burks
 
Axis2 Landscape
Axis2 LandscapeAxis2 Landscape
Axis2 Landscape
Eran Chinthaka Withana
 
Spring Basics
Spring BasicsSpring Basics
web programming
web programmingweb programming
web programming
shreeuva
 
Web service through cxf
Web service through cxfWeb service through cxf
Web service through cxfRoger Xia
 
Better Enterprise Integration With the WSO2 ESB 4.5.1
Better Enterprise Integration With the WSO2 ESB 4.5.1Better Enterprise Integration With the WSO2 ESB 4.5.1
Better Enterprise Integration With the WSO2 ESB 4.5.1WSO2
 
Android application architecture
Android application architectureAndroid application architecture
Android application architecture
Romain Rochegude
 

Similar to Advaced training-wso2-esb (20)

SCDJWS 5. JAX-WS
SCDJWS 5. JAX-WSSCDJWS 5. JAX-WS
SCDJWS 5. JAX-WS
 
High Volume Web API Management with the WSO2 ESB
High Volume Web API Management with the WSO2 ESBHigh Volume Web API Management with the WSO2 ESB
High Volume Web API Management with the WSO2 ESB
 
Axis2
Axis2Axis2
Axis2
 
Integrating with SAP FIX and HL7
Integrating with SAP FIX and HL7Integrating with SAP FIX and HL7
Integrating with SAP FIX and HL7
 
Wso2 tutorial
Wso2 tutorialWso2 tutorial
Wso2 tutorial
 
Xml web services
Xml web servicesXml web services
Xml web services
 
Web API or WCF - An Architectural Comparison
Web API or WCF - An Architectural ComparisonWeb API or WCF - An Architectural Comparison
Web API or WCF - An Architectural Comparison
 
Web services Concepts
Web services ConceptsWeb services Concepts
Web services Concepts
 
Riding with camel
Riding with camelRiding with camel
Riding with camel
 
OWIN and Katana Project - Not Only IIS - NoIIS
OWIN and Katana Project - Not Only IIS - NoIISOWIN and Katana Project - Not Only IIS - NoIIS
OWIN and Katana Project - Not Only IIS - NoIIS
 
MQ Support for z/OS Connect
MQ Support for z/OS ConnectMQ Support for z/OS Connect
MQ Support for z/OS Connect
 
How to – wrap soap web service around a database
How to – wrap soap web service around a databaseHow to – wrap soap web service around a database
How to – wrap soap web service around a database
 
Lightning web components
Lightning web components Lightning web components
Lightning web components
 
Networked APIs with swift
Networked APIs with swiftNetworked APIs with swift
Networked APIs with swift
 
Axis2 Landscape
Axis2 LandscapeAxis2 Landscape
Axis2 Landscape
 
Spring Basics
Spring BasicsSpring Basics
Spring Basics
 
web programming
web programmingweb programming
web programming
 
Web service through cxf
Web service through cxfWeb service through cxf
Web service through cxf
 
Better Enterprise Integration With the WSO2 ESB 4.5.1
Better Enterprise Integration With the WSO2 ESB 4.5.1Better Enterprise Integration With the WSO2 ESB 4.5.1
Better Enterprise Integration With the WSO2 ESB 4.5.1
 
Android application architecture
Android application architectureAndroid application architecture
Android application architecture
 

More from Chanaka Fernando

Designing microservices platforms with nats
Designing microservices platforms with natsDesigning microservices platforms with nats
Designing microservices platforms with nats
Chanaka Fernando
 
WSO2 API microgateway introduction
WSO2 API microgateway introductionWSO2 API microgateway introduction
WSO2 API microgateway introduction
Chanaka Fernando
 
Wso2 api microgateway deployment patterns
Wso2 api microgateway deployment patternsWso2 api microgateway deployment patterns
Wso2 api microgateway deployment patterns
Chanaka Fernando
 
Federated api management with wso2 api manager
Federated api management with wso2 api managerFederated api management with wso2 api manager
Federated api management with wso2 api manager
Chanaka Fernando
 
Wso2 enterprise integrator deployment patterns
Wso2 enterprise integrator deployment patternsWso2 enterprise integrator deployment patterns
Wso2 enterprise integrator deployment patterns
Chanaka Fernando
 
Api management best practices with wso2 api manager
Api management best practices with wso2 api managerApi management best practices with wso2 api manager
Api management best practices with wso2 api manager
Chanaka Fernando
 
Wso2 api manager analytics and reporting
Wso2 api manager analytics and reportingWso2 api manager analytics and reporting
Wso2 api manager analytics and reporting
Chanaka Fernando
 
Exploring ballerina toolset (docker, testing, tracing, analytics, and more) ...
Exploring ballerina toolset (docker, testing, tracing, analytics, and more)  ...Exploring ballerina toolset (docker, testing, tracing, analytics, and more)  ...
Exploring ballerina toolset (docker, testing, tracing, analytics, and more) ...
Chanaka Fernando
 
File processing and websockets with ballerina chanaka edited
File processing and websockets with ballerina chanaka editedFile processing and websockets with ballerina chanaka edited
File processing and websockets with ballerina chanaka edited
Chanaka Fernando
 
Hybrid integration platform reference architecture
Hybrid integration platform reference architectureHybrid integration platform reference architecture
Hybrid integration platform reference architecture
Chanaka Fernando
 

More from Chanaka Fernando (10)

Designing microservices platforms with nats
Designing microservices platforms with natsDesigning microservices platforms with nats
Designing microservices platforms with nats
 
WSO2 API microgateway introduction
WSO2 API microgateway introductionWSO2 API microgateway introduction
WSO2 API microgateway introduction
 
Wso2 api microgateway deployment patterns
Wso2 api microgateway deployment patternsWso2 api microgateway deployment patterns
Wso2 api microgateway deployment patterns
 
Federated api management with wso2 api manager
Federated api management with wso2 api managerFederated api management with wso2 api manager
Federated api management with wso2 api manager
 
Wso2 enterprise integrator deployment patterns
Wso2 enterprise integrator deployment patternsWso2 enterprise integrator deployment patterns
Wso2 enterprise integrator deployment patterns
 
Api management best practices with wso2 api manager
Api management best practices with wso2 api managerApi management best practices with wso2 api manager
Api management best practices with wso2 api manager
 
Wso2 api manager analytics and reporting
Wso2 api manager analytics and reportingWso2 api manager analytics and reporting
Wso2 api manager analytics and reporting
 
Exploring ballerina toolset (docker, testing, tracing, analytics, and more) ...
Exploring ballerina toolset (docker, testing, tracing, analytics, and more)  ...Exploring ballerina toolset (docker, testing, tracing, analytics, and more)  ...
Exploring ballerina toolset (docker, testing, tracing, analytics, and more) ...
 
File processing and websockets with ballerina chanaka edited
File processing and websockets with ballerina chanaka editedFile processing and websockets with ballerina chanaka edited
File processing and websockets with ballerina chanaka edited
 
Hybrid integration platform reference architecture
Hybrid integration platform reference architectureHybrid integration platform reference architecture
Hybrid integration platform reference architecture
 

Recently uploaded

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 

Recently uploaded (20)

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 

Advaced training-wso2-esb

  • 1. Chanaka Fernando Senior Technical Lead WSO2 Inc. WSO2 ESB internals and advanced concepts
  • 2. Agenda • ESB Internal Architecture • Transports and axis2 engine • Synapse Runtime • Solving common integration problems • Extending the ESB with custom code • ESB Connectors Source : http://bonfirehealth.com/week-13-insights-spark-integration/
  • 5. Transports and axis2 engine  Axis2 Transport
  • 6. Transports and axis2 engine TransportListener Implementations of this interface should specify how incoming messages are received and processed before handing them over to the Axis2 engine for further Processing. TransportSender Implementations of this interface should specify how a message can be sent out from the Axis2 engine. TransportReceivers and TransportSenders are registered to the server using axis2.xml file Same axis2.xml file can be used to define transport configuration parameters Editing axis2.xml need to be followed by a server restart Value of the name attribute can be used to uniquely identify the transport with ESB <transportReceiver name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOListener“/> <transportSender name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOSender“/>
  • 7. Transports and axis2 engine Message Builder Identify the message using the content type and convert it to common XML. There is a message builder associated with each content type. WSO2 ESB includes message builders for text-based and binary content. Message Formatter The opposite partners of the message builders. The formatter converts the message back to its original format by referencing the content type just before the message handover to the transports. <messageBuilder contentType="application/xml" class="org.apache.axis2.builder.ApplicationXMLBuilder"/> <messageFormatter contentType="application/xml" class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
  • 9. Synapse Runtime NHTTP transport The key advantage of this architecture is that it enables the ESB (mediators) to intercept all the messages and manipulate them in any way necessary. The main downside is every message happens to go through the Axiom layer, which is not really necessary in cases like HTTP load balancing and HTTP header-based routing. Also the overhead of moving data from one buffer to another was not always justifiable in this model. The default HTTP/HTTPS transport prior to ESB 4.6.0
  • 11. Synapse Runtime Binary Relay A Message Builder, that takes the input stream and hides it inside a fake SOAP message without reading it, and a Message Formatter that takes the input stream and writes it directly to a output stream. • Builder : org.wso2.carbon.relay.BinaryRelayBuilder • Formatter :org.wso2.carbon.relay.ExpandingMessageFormatter The Builder Mediator can be used to build the actual SOAP message from a message coming in to ESB through the Message Relay.
  • 13. Synapse Runtime Passthrough Transport Based on a single buffer model and completely bypassed the Axiom layer. On-demand message parsing in the mediation engine. The default HTTP/HTTPS transport since ESB 4.6.0. <transportSender name="http" class="org.apache.synapse.transport.passthru.PassThroughHttpSender“/> <transportReceiver name="http" class="org.apache.synapse.transport.passthru.PassThroughHttpListener“/>
  • 16. Solving common integration problems Message Transformations • Possible to add , remove , edit elements in the payload. • Possible to transform into entirely different message or different content type. XML = > XML XML => JSON Mediators XSLT XQuery PaylodFactory Smooks Enrich Use mediators like XSLT and XQuery in complex transformation. • Payload Factory and Enrich mediator perform better in simple transformation scenarios
  • 17. Solving common integration problems XML->JSON <proxy name="JSONTempProxy"> <target> <outSequence> <property name="messageType" value="application/json" scope="axis2"/> <send/> </outSequence> <endpoint> <address uri=“...."/> </endpoint> </target> </proxy>
  • 18. Solving common integration problems Message Validation
  • 19. Solving common integration problems Message Validation <validate> <schema key="temp-msg.xsd"/> <on-fail> <makefault version="soap11"> <code xmlns:tns="http://www.w3.org/2003/05/soap- envelope" value="tns:Receiver"/> <reason value="Invalid Request!!!"/> </makefault> <property name="RESPONSE" value="true"/> <header name="To" action="remove"/> <send/> </on-fail> </validate>
  • 20. Solving common integration problems Service Chaining
  • 21. Extending ESB with custom code Scheduler Task MessageInjector Default Task implementation Inject messages into “Main” flow Support simple scheduling and cron statements Support for JavaBean like property settings import org.apache.synapse.ManagedLifecycle; import org.apache.synapse.task.Task; public class HelloWorldTask implements Task , ManagedLifecycle { private String message; public String getMessage () { } public void setMessage(String message) { } }
  • 22. Extending ESB with custom code Extending the ESB with Class mediator Messages coming in to ESB can be processed from custom java code Class mediator gets the same privilege as an internal ESB mediator Needs to implement AbstractMediator interface Parameters can be passed through setter methods Message can be altered inside the mediate method through MessageContext object Can be built as a jar file or as an osgi bundle
  • 23. Extending ESB with custom code Extending the ESB with Class mediator import javax.xml.namespace.QName; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.synapse.MessageContext; import org.apache.synapse.mediators.AbstractMediator; public class DiscountQuoteMediator extends AbstractMediator { public boolean mediate(MessageContext mc) { String price = mc.getEnvelope().getBody().getFirstElement().getFirstElement(). getFirstChildWithName(new QName("http://services.samples/xsd", "last")).getText(); System.out.println("Original price: " + price); System.out.println("Discounted price: " + discountedPrice); return true; } public void setTraceState(int traceState) { traceState = 0; } public int getTraceState() { return 0;
  • 24. ESB Connectors A connector is a ready made and convenient tool to reach publicly available web API’s. Simplified configuration to access external api ‘Cloud to Cloud’ and ‘Cloud to Enterprise’ Integration On premise integration Connecting with systems located in your enterprise perimeter Ex: SAP, Database, SOAP/REST web service Can be proprietary/ legacy systems Security is a less concern when connecting with these systems Performance is a critical factor for business success Cloud integration Connecting with a publicly available cloud APIs Ex: Twitter, Salesforce, Google Spreadsheet Security needs to be handled carefully when connecting to public APIs Performance is not critical when connecting to cloud APIs Configuration driven approach to perform different operations on the cloud platform
  • 25. ESB Connectors Use Case I – Connect to cloud API and extract data
  • 26. ESB Connectors Use Case II – Cloud to Cloud integration
  • 27. ESB Connectors Use Case III – On premise to cloud integration soa p
  • 28. ESB Connectors Writing a custom connector to public API A connector is a collection of templates that define operations users can call from their ESB configurations to easily access specific logic for processing messages. Typically, connectors are used to wrap the API of an external service. For example, there are several default connectors provided with the ESB that call the APIs of services like Twitter and JIRA. Creating a connector involves the following high-level tasks: Research the APIs provided by the service for which you want to create a connector. Decide which API you are going to use to write the connector. For example, JIRA provides a REST API and Java API. If you choose the REST API, you can create your connector and operations entirely from XML configuration files. If you choose a Java API, you create XML configuration files that define your connector and point to your Java classes that define the operations. Use the connector core libraries to write your connector. After you create the files, you package them in a ZIP file, which you can then add to an ESB instance.
  • 29. ESB Connectors Writing a custom connector to public API Here are some useful resources for step by step guides to write a connector for a public API http://chanakaindrajith.blogspot.com/2014/04/getting-started-with-wso2-esb- connectors.html https://docs.wso2.com/display/ESB481/Creating+a+Connector http://wso2.com/library/articles/2014/02/how-to-write-a-esb-connector/