You are on page 1of 98

WSO2 Enterprise Service Bus

Product Configuration

WSO2 Training
Objectives

o  At the end of this course, attendees will be able to:


o  Identify the fundamental building blocks of SOA
o  Understand the role of an ESB in SOA
o  Setup, start and shutdown WSO2 ESB
o  Load, run and understand WSO2 ESB samples
o  Create flows for routing, filtering and transforming messages
o  Create proxy services and REST APIs for exposing simple web
services and applications
o  Integrate WSO2 ESB with message brokers for persistent and
asynchronous messaging
o  Apply basic WS-Security principles to secure proxy services & APIs
o  Understand EIP basics and see how WSO2 ESB can be used to
implement them 
Course Outline
o  Terminology and Background o  Working with APIs
o  Common State at Enterprises o  Usingthe REST API
o  What is ESB? Why ESB? o  Nouns, Verbs, Message Formats
o  SOA and use of ESB Integration o  REST, JSON

o  Introduction to WSO2 ESB o  Working with Tasks


o  Message Workflow o  Using Connectors
o  Basic Building Blocks
o  Working with Quality of Services (QoS)
o  Message Triggers
o  Load
Balancing, Throttling, Caching, WS
o  Enterprise Integration Patterns (EIPs) Security
o  ESB Functionality o  Application Deployment
o  Message Routing o  Creating Composite Apps (C-Apps)
o  Traffic Filtering o  Artifact Governance
o  Service Chaining o  Troubleshooting and Testing
o  Massage Transformation
o  Logs and Error Handling
o  Protocol Switching
o  Administration Basics
o  Message Format Switching
o  User Management
o  Store and Forward
o  Registry Mounting
o  Working with Proxy Services o  System Monitoring
o  Working with Main Sequence
WSO2 Carbon Platform
The Complete Stack
What is WSO2 Carbon?
o  Carbon Platform
o  Component-based, service-oriented middleware platform
o  All WSO2 middleware products are built on top of Carbon

wso2.com/products
WSO2 Platform
ESB and SOA
Terminology and Background
Enterprise Reality
Diverse Business Cloud
Requirements APIs

No
Single
Vendor

Legacy
Systems
Scalability, Maintainability,
Troubleshooting
Leveraging the ESB
What is ESB?

o  Enterprise Service Bus


o  Enables communication among various heterogeneous
applications, handling transformations and routing of messages

o  Uses event-driven and standards-based messaging engine

o  Performs variety of Enterprise Integration Patterns (EIPs)


including filtering, transforming and routing
Evolution of the ESB

o  Enterprises are (and will continue to be) heterogeneous


Key Benefits of the ESB

o  Bridging Heterogeneous Technologies


o  Abstract necessary components
o  Use services and messages together with a service bus

o  Key Benefits
o  Open Standards (WSDL, SOAP, JMS, HTTP, FTP…)
o  Increased flexibility; easier to change as requirements change
o  Scales from point-solutions to enterprise-wide deployment
(distributed bus)
o  Configuration rather than integration coding
o  No central rules-engine, no central broker
When to Use an ESB?

o  Common use cases


o  Heterogeneous systems
o  Moving files between systems
o  Moving messages between queues
o  Transforming data between systems
o  Orchestrating a process between several systems
o  Processing messages or data according to defined business rules
o  Exposing legacy systems as web services and providing data from
web services to legacy systems

o  What is your use case?


o  Using
standards, Integration Architects can exploit the value of
messaging without writing code for any of these use cases
Common Scenarios - Integration

o  Enterprise Integration and ESB


o  Connect anything to anything
o  Democratize enterprise integration
o  Lower integration efforts and raise integration quality
o  Fit integration infrastructure into any project
o Achieve high performance, high availability, elastic scalability
and solid stability

o  http://wso2.com/use-cases/enterprise-integration-and-esb
ESB in the Context of SOA

o  What is SOA?
o  Architectural approach based on discrete pieces of software
providing functionality as services to other applications. Services
are well defined and reusable.

o  Pre-requisite Reading:
o  Web Services – Application component that communicates via
open protocols. Deployed on a server that can expose the service
o  WSDL – Web Service Description Language. A standard meta-
language to describe the services offered
o  UDDI – Universal Description, Discovery and Integration
specification. A mechanism to register and locate WS-based
applications
o  SOAP – Simple Object Access Protocol. A Standard way for
communication
ESB in the Context of SOA

o  What part of SOA is out of the ESB ?


o  Organization
o  SOA Processes, Service Management
o  Processes
o  Business high level component based on Human and/or
automated activities
o  Governance
o  How can one achieve SOA Maturity
o  How do ensure SOA is useful to your enterprise ?

o  WSO2 platform is providing other tools to cover SOA Needs


o  Governance Registry
o  API Manager
o  Business Process Server…
ESB in the Context of SOA

o  ESB in the Context of SOA?


o  SOA: Design/develop smaller components as services for
reusability
o  ESB: Communication and interaction between these services

o  ESB message routing and distribution


o  No hard-coded destinations for messages or services
o  Support virtualization (mapping logical destinations to real ones)
o  Support event architectures (publisher doesn’t know about
subscribers)

o  ESB Security Control


o  Augment application security with central security controls
ESB in the Context of SOA

o  ESB Management
o  Provide a common set of management capabilities
o  These include Alerting, Statistics, Audit and Logging

o  Excellent Support for the Web Architecture 


o  Good use of HTTP and the Web Architecture
o  Support for HTTP proxying and caching

o  XML Performance
o  Minimum overhead (scalable and performant)
o  non-blocking IO (no block while waiting for response) 
o  Streaming XML (no in-memory buffer or full parsing)
ESB_HOME - Directory Structure
Introduction to
WSO2 ESB
Working with WSO2 ESB

High-level Message Flow (Programming Model)

1 2 3
In Sequence

Client 6 5 4 Service

Out Sequence

!
Fault Seq.
Building Blocks

Sequences Endpoints

Client Service

Transports Mediators
Building Blocks

o  Sequences
o  Define logic for handling incoming (request) and outgoing
(response) messages
o  Sequences list mediators in order of execution

o  Mediators
o  Take action on the message
o  Filter, Transform, Drop, Send, Property, Payload Factory

o  Endpoints
o  Define external destination for a message, usually a service

o  Transports
o  Carry messages in a specific format
Triggering Messages

Messages can be injected into sequences through


the following triggers:

o  Proxy Services
o  Main Sequence
Service
o  APIs (http Services)
o  Tasks
o  Inbound Endpoints
Triggering Messages

Proxy Services
o  Acts like a virtual service. Receives messages and mediates them
before sending them to the endpoint (usually an actual service)
o  Examples:
o  Perform necessary transformations and/or introduce
additional functionality without changing existing service
o  Online License Renewal Scenario

Proxy Service

Service
Triggering Messages

Main Sequence
o  Messages not destined for Proxy Services are sent through Main
o  Examples:
o  Default sequence for non-qualified messages
o  Send all messages to Main for logging before being redistributed
to other Proxy services

Main Sequence

Service
Building Blocks: Sub-sequences

o  Sequences and Sub-sequences


o  Sequence is the reusable container
o  Main and Fault sequence are default behavior
o  All incoming message that are not handled go to the main
sequence that only logs
o  All errors go to the error sequence that logs the message
before dropping it
o  One can chain sequence or use a sequence inside another
sequence using sequenceMediator

Sequences
Building Blocks: Sub-sequences

o  Sequences Error Handling


o  The default Fault sequence can and should be redefined
o  Use errorSequence to send error to a specified sequence
o  This allows a more precise error Handling Scope using the try-
catch pattern

Sequences

Error Sequences
Triggering Messages

APIs (HTTP Services)


o  APIs can accept REST messages which allow clients to provide
additional information on how to manage the message
o  Examples:
o  It can handle multiple URLs
o  Can handle parameters in the URL

API

Service
Triggering Messages

Tasks
o  Allow configuration of scheduled jobs to execute internal/external
commands
o  Inject a message into a proxy service, Main sequence or a named
sequence
o  Example:
o  ESB allows scheduled tasks to go fetch data

Service
Manipulating Messages with XPath
XPath is a language that describes a way to
locate and process items in XML documents Input XML

o  XPath parser receives an XML input, applies an XPath


expression and returns an XML output
Xpath
Xpath Expression
Parser

o  XPath provides a mechanism to select XML nodes and


a set of integrated functions to work with selected
nodes:
Output
•  Math: round(),abs() ...
XML
•  String: concat(), substring() ...
•  Date: seconds-from-duration() …
•  Aggregation: last(), position() …
•  Custom
For more information, please refer to:
http://www.w3schools.com/xpath/xpath_syntax.asp
XPath by Example <?xml version="1.0" encoding="UTF-8"?>
<bookstore>
<book>
<title lang="en">Harry Potter</title>
<price>29.99</price>
</book>
<book>
<title lang="en">Learning XML</title>
<price>39.95</price>
</book>
</bookstore>

Path Expression Result


bookstore Selects all nodes with the name "bookstore"

/bookstore Selects the root element bookstore

bookstore/book Selects all book elements that are children of bookstore

//book Selects all book elements no matter where they are in the document

//@lang Selects all attributes that are named lang

/bookstore/book[1] Selects the first book element that is the child of the bookstore element.

/bookstore/book[last()] Selects the last book element that is the child of the bookstore element

/bookstore/book[position()<3] Selects the first two book elements that are children of the bookstore element

//title[@lang] Selects all the title elements that have an attribute named lang

//title[@lang='en'] Selects all the title elements that have an attribute named lang with a value of 'en'

/bookstore/book[price>35.00] Selects all the book elements of the bookstore element that have a price element with a
value greater than 35.00
Lab Reference: ESB and Developer Studio

All your configuration will be done in


Dev Studio and Deployed to ESB
Dev Studio
(Eclipse)

Soap UI WSO2 WSO2 AS


(Client) ESB (Back-end
Services)
Used for testing purposes to UI Management Console at: UI Management Console at:
send messages to ESB https://localhost:9443/carbon https://localhost:9444/carbon
Lab Review: ESB and Developer Studio
High-level Steps:
1.  Create an ESB Configuration Project to house your configurations
2.  Create a simple pass through Proxy Service
3.  Add Log Mediator to existing Proxy Service
4.  Deploy your new configuration to your ESB
5.  Test your proxy service

1 2 3

Dev Studio
(Eclipse)

5
Soap UI WSO2 WSO2 AS
(Client) ESB (Back-end
Services)
WSO2 ESB
Enterprise Integration Patterns
Enterprise Integration Patterns

EIPs
o  A set of standards in architecting integration patterns
o  EIP Catalog: http://www.eaipatterns.com/toc.html

o  WSO2 EIP Guide describes how to implement these patterns in WSO2


ESB

Common EIPs
WSO2 ESB supports all EIPs
o  Content-based Router
o  Message Filter
o  Message Splitter
o  Message Aggregator
Selecting the Right EIP
Quiz on EIPs – What message router(s) is/are needed?
1.  Online Dictionary: Routing messages to English Dictionary Service versus
French Dictionary Service
2.  Online Loan Request: Obtaining customer’s credit score before providing
them a loan rate. (Enriching a message)
3.  How can you maintain overall message flow when processing a message
consisting of multiple elements (i.e. an order), each of which may require
different processing?
WSO2 ESB
Mediator Functionality
Message Routing

Switch Mediator
o  Allows content-based routing
o  Evaluates the XPath or JSONPath and returns a string. This string is
evaluated against a regular expression in each case statement.
o  If a matching case is found, no others are evaluated. If no match,
a default will be executed.

Class Exercise:
o  Review mediator documentation and identify:
–  How to configure
–  Proper syntax
–  Sample usage
o  https://docs.wso2.org/display/ESB490/Switch+Mediator
Traffic Filtering

Filter Mediator
o  Resembles the if-else control structure, filtering messages based
on the Xpath or JSONPath
o  2 modes of operation:
o  If user only specifies XPath or JSONPath, it evaluates as true or false.
o  If user specifies a regular expression as well, the string returned from
evaluating the XPath or JSONPath will be matched against the regular
expression.
o  https://docs.wso2.org/display/ESB481/filter+mediator
Service Chaining

Service Chaining
o  A collection of mediators that allows multiple services to be
exposed as one service to outside world
o  Orchestrates responses from one system that are needed as inputs
for other services
o  Best Practices: Makes use of IN, CALL and RESPONSE mediators for
simpler coordination of requests and responses to/from the various
services
o  Online License Renewal Scenario
Message Transformation

PayloadFactory Mediator
o  Transforms or replaces the contents of a message by allowing user
to define a new format
o  Arguments can be inserted into the new format – arguments can be
a static value, an Xpath or a JSON expression
o  By default, JSON messages are converted to XML
o  https://docs.wso2.org/display/ESB481/PayloadFactory+Mediator
Protocol Switching

Switching Transports
o  Allows user to change a message from one protocol to another
o  i.e. An http message can be translated to a JMS message
o  https://docs.wso2.org/display/ESB481/Sample+250%3A
+Introduction+to+Switching+Transports
Message Format Switching

Format Switching
o  Allows user to change the message between common formats
o  i.e. The client sends a JSON request but the existing service uses
XML SOAP (For this example, a message translator is needed in
each direction - request and response)
o  https://docs.wso2.org/display/ESB481/Sample+152%3A+Switching
+Transports+and+Message+Format+from+SOAP+to+REST+POX
Store and Forward

Message Stores
o  Allows users to temporarily store messages before they are finally
delivered to their destination by a message processor (For example,
to slow down the delivery rate).
o  Use the Store mediator to create In Memory (default), JMS or a
custom message store (i.e for Guaranteed Delivery)
o  https://docs.wso2.org/display/ESB481/Message+Stores

Message Processors
o  Used to deliver messages that have been temporarily stored in a
message store
o  http://docs.wso2.org/display/ESB481/Adding+a+Message+Processor
WSO2 ESB
Triggering Messages
Triggering Messages - Review

Messages can be injected into sequences through


the following triggers:

✓Proxy Services
o 
✓Main Sequence
o 
Service
o  APIs (http Services)
o  Tasks
o  Inbound Endpoints
APIs - Introduction

o Example: Coffee Shop Application

REST
Customer
Application
WSO2 SOAP WSO2
ESB AS
(API) (OMS)
REST
Barista Admin
Application
Creating APIs

o  RESTful Integration with APIs


o  http://wso2.com/library/articles/2013/12/restful-integration-
with-wso2-esb/

o  API anchored at URL context


o  GET /customer/name/{customerName}
o  GET /customer/id/{customerId}

o  Resources
o  Component of API accessed through HTTP call
o  Similar to proxy service (in, out, and fault sequences)
o  Can restrict resource’s scope using URL patterns and URI
templates
Creating APIs

Users with rights to access


context /foo can only query
objects

Users with rights to access


context /bar can add or delete
objects
Creating APIs

o  URL mapping
o  Path mappings (eg: /test/*, /foo/bar/*)
o  Extension mappings (eg: *.jsp, *.do)
o  Exact mappings (eg: /test, /test/foo)

o  URI template
o  /order/{orderId} would process /order/A0001
o  /dictionary/{char}/{word} would process
/dictionary/c/cat

o  Use get-property to retrieve exact values


<log level="custom">
<property name="Character" expression="get-property('uri.var.char')"/>
<property name="Word" expression="get-property('uri.var.word')"/>
</log>
Creating APIs

o  Use <api> tag with unique name and URL context


o  Examples

<api name="API_1" context="/order">


<resource url-mapping="/list" methods="POST" inSequence=”RequestSeq"
outSequence=“DisplaySeq"/>
</api>

<api name="API_2" context="/user">


<resource url-mapping="/list" methods="GET" inSequence=”ReqUsersSeq"
outSequence=”ReturnUsersSeq"/>
<resource uri-template="/edit/{userId}" methods="PUT POST"
inSequence=”InsertUpdateSeq" outSequence=”ReturnStatusSeq"/>
</api>
Creating APIs
<api name="API_3" context="/payments">
<resource url-mapping="/list" methods="GET" inSequence="seq1"
outSequence="seq2"/>
<resource uri-template="/edit/{userId}" methods="PUT POST"
outSequence="seq3">
<inSequence>
<log/>
<send>
<endpoint key="BackendService"/>
</send>
</inSequence>
</resource>
<resource inSequence="seq5" outSequence="seq6"/>
</api>
Using REST with a Proxy Service

o  If you have a REST front-end client, REST back-end


service, or both a REST client and service, you can use
a proxy service in the ESB to handle the communication
between the front end and back end
o  REST Client and SOAP Service
o  SOAP Client and REST Service
o  REST Client and REST Service
o  JMS Client and REST Service
o  https://docs.wso2.org/display/ESB481/Using+REST+with+a+Proxy+Service

POX SOAP
REST Client WSO2 SOAP
ESB Service
Creating APIs : Trace and QOS

o  API are Façade to Mediations


o  If you need mediation tooling, use them on the sequences
defined in the api (inSequence and outSequence)
o  Named sequences are better than built-in anonymous
sequences when you need feedback / debug
o  Traces and statistics can be enabled/disabled on named
sequences
o  Inner Error handling is available through defined error
sequence
Triggering Messages - Review

Messages can be injected into sequences through


the following triggers:

✓Proxy Services
o 
✓Main Sequence
o 
✓APIs (http Services)
o 
Service

o  Tasks
o  Inbound Endpoints
Working with Tasks

o  Tasks run a piece of code triggered by a timer, allowing


users to run scheduled jobs at specified intervals
o  Can use count and interval attributes
o  Can provide scheduled time as a cron style entry
o  Can set task to run right after ESB startup with once attribute
Triggering Messages - Review

Messages can be injected into sequences through


the following triggers:

✓Proxy Services
o 
✓Main Sequence
o 
✓APIs (http Services)
o 
Service

✓Tasks
o 
o  Inbound Endpoints
Working Inbound Endpoints

o  Tasks run a piece of code triggered by a timer, allowing


users to run scheduled jobs at specified intervals
o  Can use count and interval attributes
o  Can provide scheduled time as a cron style entry
o  Can set task to run right after ESB startup with once attribute
Inbound Endpoints
Why
Inbound Endpoints ?

Limita'ons prior to ESB 4.9.0
●  Conven1onal axis2 based Transports does not support dynamic
configura1on
Ex: To change the ports, restart is required

axis2.xml configuration
Why Inbound Endpoints ?

Limita'ons prior to ESB 4.9.0
●  Mul1-tenancy support is limited
○  Only HTTP Transport supports mul1-tenancy








Inbound Endpoints Features
●  A message source that can be configured dynamically





Inbound Endpoints Features
●  Inbound architecture allows Mul1-tenancy for all transports
○  JMS, VFS, HL7, etc





Inbound Endpoints Features
●  Coordina1on Support
○  Controlled execu1on on clustered environment
○  Worker-Manager deployment for all transports






Inbound

Endpoints Features
Coordina'on Support - Single Consumer





Inbound Endpoints Features
Coordina'on Support - Mul'ple Consumer





Inbound Endpoints Features
●  Injects messages directly from transport layer to media1on layer
without going through the axis2 engine

●  Dedicated thread pools per inbound

●  Extending the func1onality with custom inbound endpoints








Inbound Endpoint Types
●  Listening Inbound Endpoints

●  Polling Inbound Endpoints

●  Event Based Inbound Endpoints

●  Custom Inbound Endpoints













Custom Inbound Endpoints
●  Custom Inbound Endpoints are user defined inbound endpoints
for custom tasks.
○  You will have to extend following classes for different implementa1ons
■  Custom Listening Inbounds - GenericInboundListener
■  Custom Polling Inbounds - GenericPollingConsumer
WSO2 ESB
Working with Connectors
About Connectors

Connectors allow ESB to interact with products like


Twitter, Salesforce, Google Docs, JIRA

o  Operations provide access to APIs


o  Can add connectors to your ESB instance
o  Download and enable in your instance
o  https://github.com/wso2/esb-connectors/tree/master/distribution
o  You can create your own custom connector
Using Connectors
WSO2 ESB
Working with Quality of Services
Quality of Service (QoS) on Web Services

o  Security
o  Enable predefined security scenarios (WS-Security)
o  Apply security policies (WS-Policy)
o  Reliable Messaging (WS-Reliable Messaging)
o  Response Caching
o  Access Throttling
o  Message Transformation Optimization Mechanism (MTOM)
o  QoS Attributes
o  Transports
o  Module Engagement
o  Parameters
o  Operations
o  https://docs.wso2.org/display/ESB481/Managing+Web+Services
WSO2 ESB
Application Deployment
Application Deployment

Migrating Environments

DEV QA PROD
C-App

CAR

1.  Create Composite Application Project (C-App) from ESB Config project
2.  Export C-App as a Composite Application Archive (CAR) file
3.  Upload CAR file into target ESB instance
Packaging Artifacts and Deployment
1. Create a Composite Application (C-App)
o  A C-App is a collection of artifacts (i.e. endpoints, mediators)
which can be deployed on a Carbon instance to easily port your
web services solutions from one environment to another

2. Export C-App to an CAR file


o  A Composite Application aRchive (CAR) file contains the collection
of artifacts included in your C-App

3. Deploy it to your target Carbon server


o  The CAR file can be moved to any other environment for
importing/uploading

o  Follow steps at:


https://docs.wso2.org/display/DVS360/Packaging+Artifacts+Into
+Deployable+Archives
Artifact Governance

Governing External References Across Environments


o  One Embedded Registry Per Environment
Artifact Governance

Governing External References Across Environments


o  One Stand Alone Registry per Environment
Artifact Governance

Governing External References Across Environments


o  Shared Registry Instance Across Multiple Environments
Registry Mounting

ESB Registry
o  Carbon core provides basic registry and repository functionality.
o  Local repository (/_system/local): Stores config and runtime data
local to server. Rarely used.

o  Configuration repository(/_system/config): Stores product-


specific configs. Can be shared across multiple instances of same
product (i.e. sharing ESB config across ESB cluster).

o  Governance repository(/_system/governance): Stores config and


data shared across whole platform. This space typically includes
services, service descriptions, endpoints, and datasources.
ESB Registry vs. Governance Registry

ESB: Local ESB: Governance

ESB ESB ESB AS AS


ESB ESB ESB AS AS

ESB: Config Governance Registry

ESB ESB ESB AS AS ESB ESB ESB AS AS

G-REG

Mounting a Remote Registry


o  https://docs.wso2.org/display/ESB481/Remote+Registry+Instance+Configuration
Artifact Governance - Best Practices

Governing External References Across Environments


o  Whenever you need to reference an endpoint, create it in the
registry. This registry can either be embedded or stand-alone. This
approach ensures that the application can be deployed unchanged
from one environment to another.

o  Do not include environment/version detail in your reference to


endpoints or any external reference inside your application.

o  Reference endpoints from client applications using a key pointing


to the governance registry (i.e. gov:/public/endpoints/WeatherService).
This value is constant across all environments.

o  Ensure endpoint definitions are present and accurate in all


environments prior to deploying an application using them.
WSO2 ESB
Troubleshooting
Logging
o  System logs– Events of entire system holistically (wso2carbon.log)
o  Application logs– Events for selected web app or web service
(enable in log4j.properties)
o  Log mediator– Monitors messages mediated inside sequences
o  Access logs- Entries for service and REST API invocations and
Management Console access (http-access*.log)
o  SOAP Tracer- Monitors SOAP requests/responses (Mgt Console UI)
o  Thread Dump from JVM

o  Setting Up
o  https://docs.wso2.org/display/ESB481/Setting+Up+Logging
o  Edit log4j.properties or Configure through Managment Console
o  Enable wire logs (logs header/payloads of everything entering/
exiting ESB)
Monitoring Tools

Statistics
o  https://docs.wso2.org/display/ESB481/Statistics
Mediation Tracer
o  https://docs.wso2.org/display/ESB481/Mediation+Tracer
SOAP Tracer
o  https://docs.wso2.org/display/ESB481/SOAP+Tracer
JMX Monitoring
o  https://docs.wso2.org/display/ESB481/JMX+Monitoring
TCPMon Monitoring
o  https://docs.wso2.org/display/ESB481/TCPMon+Monitoring
Message Flow Handlers
o  https://docs.wso2.org/display/ESB481/Viewing+the+Handlers+in
+Message+Flows
Message Flows

ESB Monitoring
o  This Graphical View provides a view of what is configured.
Error Handling
Runtime exceptions are common when dealing with a variety of
applications, networks, wire level protocols, remote APIs, etc.
Handling these exceptions gracefully is key.

o  Fault sequence allows special dealing of error triggering messages


(i.e. log error, send friendly message to client, notify admins)

o  In Fault sequences, the following Error Properties are available via


get-property:
o  ERROR_CODE, ERROR_MESSAGE, ERROR_DETAIL, ERROR_EXCEPTION
o  Error Codes and descriptions found here:
o  https://docs.wso2.org/display/ESB481/Error+Handling

o  Makefault mediator – Allows editing of message returned to client


Error Handling - 2 Types of Errors

1
CLIENT CLIENT CLIENT

1 Example: Bad Format


ESB can use the MakeFault mediator to create a SOAPfault and send
a message to client

2 Example: Message not according to WSDL


Service returns an error wrapped in SOAP envelope. In ESB, configure
a search of the payload for "//fault" using a filter mediator.
Endpoint Error Handling
o  Endpoint States
o  Active – running and handling requests.
o  Timeout – Encountered error but can still process messages. Will
suspend if it encounters more errors.
o  Suspended – Encountered error and cannot process messages.
o  OFF – Endpoint is not active.

o  Configuring address (leaf) endpoints


o  Timeout settings (so EP can recover from Suspend states)
o  Mark for Suspension Settings
o  Retry options
o  Guaranteed Delivery
o  Failover EPs (i.e. Disaster Recovery EP if main EP fails)
o  suspendOnFailure settings
WSO2 ESB
Administration Basics
User Management
User Management
o  Allows us to manage users, roles and their permissions. User can
be a person, a device or another app in/outside the organization.

User Stores
o  Db where users/roles details are stored (name, email, passwd)
o  User Store can run in read/write mode or in read-only mode

Primary and Secondary User Stores


o  By default, ESB uses embedded H2 database as Primary. User can
configure to use a different database.
o  By default, ESB is configured to use 1 user store. User can
configure to use 2+ stores with various permissions.

https://docs.wso2.org/display/ESB481/User+Management
User Management – Carbon Kernel

User Management is part of the Carbon core, featuring:


o  The concept of single primary user store.
o  Ability to operate in read-only/read-write mode on your company's
LDAP user stores.
o  Ability to work with Active Directory Directory Services (AD DS)
and Active Directory Lightweight Directory Services (AD LDS) in
read write mode.
o  Supports any custom user store.
o  Roles can contain users from primary user stores.
o  Improved configuration capability for primary user stores.
o  Capability to read roles from LDAP/Active Directory user stores.
o  Implements management permission of the carbon console.
o  The user core is driven by the user-mgt.xml file found in:
CARBON_HOME/repository/conf folder.
Resources

o  WSO2 Products: http://docs.wso2.org/

o  ESB 4.8.1
o http://docs.wso2.org/display/ESB481/WSO2+Enterprise
+Service+Bus+Documentation

o  Developer Studio 3.7.0


o http://docs.wso2.org/display/DVS370/WSO2+Developer
+Studio+Documentation

o  EnterpriseIntegration Patterns with WSO2 ESB


o http://docs.wso2.org/display/IntegrationPatterns/
Enterprise+Integration+Patterns+with+WSO2+ESB
Certification Exam

▪  Op1onal, online exam



▪  15 Mul1ple-choice ques1ons

▪  You can take exam now or any1me in the next 30 days

▪  Once started, you must complete exam within 60 minutes

▪  Ques1ons are based on material covered during training

▪  To pass, you need a score of 73% or be`er (11 out of 15)

▪  View/Print Cer1ficate online

▪  Join LinkedIn Group: WSO2 Cer1fied Developers
Contact us !

You might also like