Websphere Message Broker: Concepts, Technical Walkthrough, Application Development
Websphere Message Broker: Concepts, Technical Walkthrough, Application Development
Agenda
Pre-requisites for the Training
Introduction
Application Integration
The Complexity of Application Integration
Challenges and Issues Businesses are facing today
Point-to-Point Communication
Enterprise Application Integration
Why EAI
Defining EAI
The Connectivity Challenge
Types of EAI
EAI Approach to Integration
Enterprise Application Integration Benefits
Agenda contd
Service Oriented Architecture
What is a service
SOA Definition
How do you know when youve got SOA?
SOA vs Traditional EAI
Benefits of SOA
Principles & Benefits of SOA
Enterprise Service Bus
Definition
SOA with an ESB
ESB Flexibility
An ESB gives SOA its full value
Integrating business applications through an ESB
Agenda contd
Enterprise Service Bus
Different kinds of ESB
Examples of ESB
Various Middleware Products
Agenda contd
Introduction to WebSphere Message Broker
Overview
Quick Tour
WebSphere Message Broker
Platform Support
Database Support
Protocol, Transports, Data Formats and Processing
Support
WebSphere Message Broker Business Scenario
Technical Overview Architecture
Capabilities
Enterprise Messaging
Message Brokering
Agenda contd
Publish & Subscribe
Publish & Subscribe Implementation
WebSphere MQ Interoperability
WMB Components
Development Environment
Runtime Environment
WMB Components Interaction
Agenda contd
WebSphere MQ Explorer
Message Flow Revisited
Message Broker Parsers
Message Tree
Logical Tree Structure
Message tree structure
Environment tree structure
Local environment tree structure
Exception list tree structure
Message Flow Editor
WebSphere Message Broker Software Components
Agenda contd
Agenda contd
10
Agenda contd
Agenda contd
12
Agenda contd
Prerequisites
Introduction to ESQL
ESQL Overview
Datatypes
Operators
Variables
Statements
Functions & Procedures
Field References
Modules
Reserved Words
Non Reserved Words
Special Characters
Managing ESQL files
Writing ESQL files
Programming Examples
13
Agenda contd
Developing Applications using ESQL
LAB 1 - Simple Hello World Application
Developing Applications using ESQL
LAB 2 - Bookstore Application
14
Agenda contd
Developing Applications using Java Concepts
Developing Applications using Java Labs
LAB 3 - Simple Hello World Application
LAB 4 - Connecting with Database (Bookstore Application)
15
Agenda contd
16
Agenda contd
WebSphere Message Broker Installation, Startup
Configurations
Message Broker Installation
Startup Configurations Windows 7
Startup Configurations Windows XP
Testing Message Flow Applications
Creating / Deleting Default Configurations
Testing Message Flow Applications using Test Client
Testing Message Flow Applications with SoapUI
Debugging Message Flow Applications
17
Agenda contd
WebSphere Message Broker Examples
Application Samples
LAB 710
Technology Samples
LAB 1115
Troubleshooting & Problem Determination
Documentation
18
XML Syntax
XML Naming Conventions
Prolog
Processing Instructions
Comments
Document Type Definition
Elements
Attributes
Entities
XML Namespaces
Validation of XML Documents
XML Schema
19
Application Integration
Agenda
What is an Application?
Introduction to Application Integration
Challenges and Issues Businesses facing today
Point-to-Point Communication
The Complexity of Application Integration
Point-to-Point Communication Consequences
Enterprise Application Integration
Why EAI
Defining EAI
The Connectivity Challenge
Types of EAI
EAI Approach to Integration
EAI Benefits
21
What is an Application ?
User Interaction
Logic
Data
Logic
Integration
Logic
Process
Logic
Business
Rules
This image cannot currently be displayed.
Monitoring &
Management
Logic
22
25
1 mainframe computer
1 user device
1 network connection
1 population of users
1 set of user requirements
1 user location
1 program
1 program owner
Composite Applications
Many computers
Many user devices
Many types of network connections
Many diverse populations of users
Many different user requirements
Many user locations
Many programs
Many program owners
26
27
Symptom
Solution
Varying degrees of
interoperability
No seamless integration
28
29
Point-to-Point Integration
In a point-to-point integration model, a unique connector
component is implemented for each pair of applications or
systems that must communicate.
This connector handles all data transformation, integration, and
any other messaging related services that must take place
between only the specific pair of components it is designed to
integrate.
Best suited for small infrastructures, where only two or three
systems must be integrated
30
E
D
C
A
B
31
32
33
Why EAI ?
System development over the last 20 years has tended to
emphasize core functionality as opposed to integration
Many systems are highly stovepiped
There are a number of organizations fitted with different types of
open and proprietary systems. each with its own development,
database, networking and operating system. Thus resulted a
heterogeneous environment.
Ultimately, it comes down to a cost issue. Building a system with
integration in mind reduces the amount of money spent on
further system development
Necessity of interconnection of disparate systems in order to
meet the needs of the business
34
35
Product
Management
DB2
Inventory
Management
Oracle
Configuration
Management
Oracle
Architectural Issues
Data Redundancy
Synchronization Problems
Application Authorization Issues
Vendor and Application Lock-in
Service
Order
Management
Trouble
Management
Billing
Management
Performance
Management
DB2
Oracle
DB2
Oracle
Integration Issues
Isolated data silos
Administrative Nightmare
Integration/customization
Nightmare
Transition from legacy systems to
a more flexible new operational
infrastructure
36
Defining EAI
EAI is defined as the unrestricted sharing of data and business
processes among any connected applications and data sources
in the enterprise.
Using EAI effectively will allow us to integrate without have to
make major changes to our current infrastructure.
37
User Interface
level
Business
Process
Method
level
Packaged
Application
App Interface
level
Data
Data
level
38
39
40
41
42
MQ/JMS
soap/jms
soap/http
http
WebSphere MQ
43
Why?
to run their
business like this.
More Flexibility
More Speed
More Efficiency
Better Services
Better Information
Increased Revenue
Reduced Cost
Lower Risk
44
45
Types of EAI
An enterprise system is made up of business processes and
data.
So when an IT expert contemplates to use EAI technology, he
has to first understand how these business processes are
automated and the importance of all business processes.
This understanding will bring out a lot of useful hints:
For determining the amount of work needed
How much time it will take
Which business processes and data are to be integrated etc.
46
47
48
50
51
52
53
Agenda
Current Environment
Service Oriented Architecture Introduction
Bridging the Gap between Business and IT: How?
SOA Introduction
What is SOA?
SOA vs Traditional EAI
Before and After SOA
Why SOA?
SOA Simplifies Connectivity Interfaces
Value of SOA
SOA is an evolutionary step
Expanding SOA Footprint
Principles of SOA
Benefits of SOA
Applying SOA Challenges
56
Current Environment
57
Reusable services
Service Oriented Architecture (SOA) is an architectural style to reuse and
integrate existing systems for designing new applications.
The goal of SOA Integration is to expose an organization's computing
assets as reusable services that can communicate and integrate more
readily. This can eliminate the "integration spaghetti" that exists in most
companies today.
58
Business and
I/T can use a
common
language
a.k.a.
Process
Integration
Business
Process
Activities
=
I/T Services
Granularity
How do I
integrate to
my existing
systems?
SOA Definition
An approach for building distributed systems that
allows tight correlation between the business
model and the IT implementation.
Characteristics:
Represents business function as a service
Shifts focus to application assembly rather than
implementation details
Allows individual software assets to become
building blocks that can be reused in developing
composite applications representing business
processes
Leverages open standards to represent software
assets
60
a service?
service orientation?
A repeatable business
task e.g., check
customer credit; open
new account
service oriented
architecture (SOA)?
An IT architectural style
that supports
service orientation
a composite application?
61
SOA Definition
An architectural style for building distributed systems that deliver
application functionality as services to either user applications or
other services
A Software Architecture which
defines the use of services to support the requirements of software
users. Resources are available to other participants as independent
services accessed in a standardized way.
comprises loosely coupled, high interoperable application services.
These services interoperate based on a formal definition independent of
the underlying platform and programming language. The interface
definition hides the vendor and language-specific implementation.
is independent of development technology (e.g. Java, .NET, COBOL,
C, ASM). The software components become very reusable because the
interface is defined in a standards-compliant manner.
62
63
Customer
eligibility
Review
application
Retrieve
credit
report
Credit
assessment
Generate
decline
Etc.
Request
additional
info
Final
application
review
Generate approval
& account info
Generate decline
65
SOA
Technology Driven
Business Driven
Application Centric
Business scope
Narrow Consumers
Limited Business Processes
Finance
Application
Application
Integration
Supply
Application
Architecture
bound to
EAI vendor
Redundancy
Manufacturing
Distribution
Overlapped resources
Overlapped providers
Business functionality is
duplicated in each application
that requires it.
67
Service Centric
Business scope
Service
Service
Supply
Service Architecture
Shared
Service
Services
Service
Manufacturing
Distribution
68
69
Why SOA ?
To enable Flexible, Federated Business Processes
Enabling a virtual federation of
participants to collaborate in an
end-to-end business process
Enabling alternative
implementations
Enabling reuse of
Services
Service
Identification
Service
Ticket Collection
Service
Ordering
Ticket Sales
Service
Service
Service
Inventory
Logistics
Service
Service
Service
Service
Manufacturing
Availability
Service to Customers
Enterprise
Smart Clients
Stores POS
Mobile
3rd Party Agents
Portal
Systems
source:TietoEnator AB,
Kurts Bilder
71
72
Application
Application
into this.
Application
Service
Service
Interface
Application
Application
Application
Application
Service
Service
Interface
Interface
Interface
Interface
Interface
Interface
Service
Service
Service
Service
= interface
Introduces rich business Decouples the
abstractions to describe
interfaces from the
the application interface.
business
applications.
Reduces the
number and
technical
complexity of
interfaces.
but you still need to know (1) what services you can connect to, (2) where they are, (3) how
to connect to them, (4) how to log into them, (5) how to mediate the differences in data
between them.
73
74
Value of SOA
Service orientation promotes few, coarse grained interactions
between the service providers and consumers
Reduces the dependencies between the two participating entities
SOA manifests the same architectural model for both and external
partner application integration
75
76
Point-to-Point
Message Bus
unmanaged / decentralized
managed / centralized
managed / decentralized
Common communication
infrastructure
n lines of connectivity
Message Broker
Common command
infrastructure
n lines of connectivity
Centralized management
Limited scalability
Single point of failure
n lines of connectivity
Proprietary communication
protocols
Complex management
77
Business Unit 2
Business Unit 1
Business Unit 3
78
Loose Coupling
Abstraction
Reusability
Autonomy
Statelessness
Discoverability
Composability
79
Services within the same service inventory are in compliance with the same
contract design standards."
80
Loose Coupling
Service contracts impose low
consumer coupling requirements and
are themselves decoupled from their
surrounding environment."
Create specific types of relationships
within and outside of service
boundaries with a constant emphasis
on reducing (loosening)
dependencies between
Service contract
Service implementation
Service consumers
Abstraction
Reusability
Services contain and express agnostic logic and can be positioned as
reusable enterprise resources."
Reusable services have the following characteristics:
Autonomy
"Services exercise a high level of control over their underlying runtime
execution environment."
Represents the ability of a service to carry out its logic independently of
outside influences
To achieve this, services must be more isolated
Primary benefits
Increased reliability
Behavioral predictability
Statelessness
"Services minimize resource consumption by deferring the management of
state information when necessary."
Incorporate state management deferral extensions within a service design
Goals
Increase service scalability
Support design of agnostic logic and improve service reuse
Discoverability
"Services are supplemented with
communicative meta data by which
they can be effectively discovered
and interpreted."
Service contracts contain
appropriate meta data for discovery
which also communicates purpose
and capabilities to humans
Store meta data in a service registry
or profile documents
Composability
"Services are effective composition
participants, regardless of the size
and complexity of the composition."
Ensures services are able to
participate in multiple compositions
to solve multiple larger problems
Related to Reusability principle
Service execution should efficient in
that individual processing should be
highly tuned
Flexible service contracts to allow
different types of data exchange
requirements for similar functions
Faster Time-to-Value
Compose new applications from existing services
Business Responsiveness
Dynamically reconfigure services to meet new business opportunities
Governance
Standardize, mandate and measure service usage
Allows you to introduce control
88
Sharing of Responsibilities
Increased complexity!
89
Agenda
What is an ESB ?
A software infrastructure for SOA which
comprises a set of interaction points to which services are connected.
Services are able to invoke other services which are connected to the
bus.
93
Flexible connectivity
e.g. prioritize customer request.
Service replacement
e.g. New service upgrade without
94
ESB Flexibility
The next stage of Integration
Point-to-Point connection
between applications
Simple, basic connectivity
95
Service
Interface
into this.
Service
Service
Interface
Interface
Service
Service
Service
Service
EnterpriseService
Service Bus
Bus
Enterprise
Interface
Interface
Interface
Interface
Service
Service
Service
Service
Service
Service
Service
Service
The ESB:
Connects and signs you Communicates
into the appropriate
using the right
service without
protocol.
requiring a hardcoded
connection.
Customizes
Logs and manages
communications so
the interaction and
that the message to
correlates events.
the receiver makes
sense.
96
Service Enrichment
Match & Route communications
between services
Converts between transport protocols
Transforms between data formats
Identifies and distributes bus events
97
98
98
Transforms between
different data formats
Distributes Business
events
Service
Requestor
Service
Requestor
Service
Provider
Service
Requestor
Service
Requestor
Routing
Security
Management
etc
Event tracking
Transformation of interfaces
100
Advanced ESB
All formats supported natively
XML, COBOL, C, SWIFT, EDI, MIME, Acord, X12
101
102
Web eCommerce
Commerce
DMZ
DMZ
APP
APP
Service
DB
Service
APP
APP
DB
Internet
APP
DB
Internet
Enterprise
Trading partner
communities
Customer communities
Travel
Reservation
Process
Cheque
Credit
Service
Book
Flight
Service
Flight
Availability
Service
Hotel
Availability
Service
New Flight
Availability
Service
Travel
Reservation
process
Travel
Reservation
Process
Old Flight
Availability
Service
104
File
MQ/JMS
soap/jms
soap/http
Enterprise
Service Bushttp
WebSphere MQ
105
106
TIBCO
Oracle Fusion Middleware
Microsoft Biztalk Server
Jboss Enterprise Middleware
WebMethods
Progress Openedge
107
108
109
110
111
Agenda
WMB Architecture
WebSphere Message Broker Capabilities
Message Routing
Interacting with External Systems and Resources
Message Broker -Transforms messages in flight
Message Transformation and Enrichment
114
Agenda contd
WebSphere MQ Interoperability
115
Agenda contd
WMB Components - Overview
Development Environment
Message Flows
Message Sets
Broker Application Perspective
Runtime Environment
Broker
Execution Groups
Configuration Manager
Broker Domain
User Name Server
Broker Administration perspective
WMB (contd.)
In WebSphere Message Broker, connectivity is provided by applications
that communicate by sending and receiving messages.
WebSphere MQ messaging provides a secure and far-reaching
communications infrastructure that you can expand with WebSphere
Message Broker or WebSphere Event Broker to apply intelligence to
your business data as it travels through your network.
Key capabilities that make WebSphere Message Broker a valuable
solution for business integration
Distributes any type of information across and between multiple
diverse systems and applications, providing delivery of the correct
information in the correct format and at the correct time
Reduces the number of point-to-point interconnections and simplifies
application programming by removing integration logic from the
applications
118
WMB (contd.)
Routes information in real time based on topic and content to any
endpoint using a powerful publish/subscribe messaging engine
Validates and transforms messages in-flight between any
combination of different message formats, including Web Services,
and other XML and non-XML formats
Routes messages based on (evaluated) business rules to match
information content and business processes
Improves business agility by dynamically reconfiguring information
distribution patterns without reprogramming end-point applications
Access control to securely deliver personalized information to the
right place at the right time
119
So what is WMB ?
WebSphere Message Broker is a powerful information broker that
allows both business data and information, in the form of messages, to
flow between disparate applications and across multiple hardware and
software platforms.
Business rules can be applied to the data that is flowing through the
message broker in order to route, store, retrieve, and transform the
information.
With WebSphere Message Broker, organizations of any size can
eliminate point-to-point connections and batch processing in order to
increase business flexibility and smart interoperability of systems
regardless of platform, protocol or data format.
120
So what is WMB ?
Built for universal connectivity and transformation in
heterogeneous IT environments
Multiple platforms
Built on WebSphere
MQ
Range of EAI
patterns
Standard protocols
High volume
processing
Extensive
transformations of data
formats
121
122
123
124
WMB Features
Universal connectivity from anywhere, to anywhere
Simplify application connectivity for a flexible and dynamic infrastructure
MQ, JMS, HTTP(S), SOAP, REST, file (including FTP, FTE, ConnectDirect),
database, TCP/IP, MQTT, CICS, IMS, SAP, SEBL, .NET, PeopleSoft,
JDEdwards, SCA, CORBA, email and more!
Understands the broadest range of data formats:
Binary (C/COBOL), XML, CSV, DFDL, JSON, industry (SWIFT, EDI, HL7 etc),
IDOCs, user-defined
Built-in suite of request processors:
Quick Tour
IBM WebSphere Message Broker - Version 7
http://www-01.ibm.com/software/integration/wbimessagebroker/v7video.html
126
Documentation
Documentation ( WMB and MQ )
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/index.jsp
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp
Technical Resources
http://www-1.ibm.com/software/integration/wbimessagebroker/library/
http://www.redbooks.ibm.com/abstracts/sg247826.html?Open
http://www.ibm.com/developerworks/websphere/library/techarticles/0912_lucas/09
12_lucas.html
127
http://www-306.ibm.com/software/integration/wbimessagebroker/
128
129
130
IBM Protocols
WebSphere MQ Everyplace
TIBCO Rendezvous
(plug-in component)
WebSphere MQ Telemetry
WebSphere MQ Real-time
TCP/IP Sockets
WebSphere MQ Multicast
SMTP
CICS
SAP
Oracle
Siebel
JDEdwards
Custom
Peoplesoft
Enterprise Applications
131
132
133
134
135
136
137
WMB Capabilities
Applications have much greater flexibility in selecting which
messages they want to receive, because they can specify a topic
filter, or a content-based filter, or both, to control the messages that
are made available to them.
Diverse applications can exchange information in dissimilar forms,
with Message Brokers handling the processing required for the
information to arrive in the right place in the correct format, according
to the rules that you have defined. The applications do not need to
know anything except their own conventions and requirements.
The Message Broker provides a framework that supports supplied
basic functions along with user-defined enhancements, to enable
rapid construction and modification of business processing rules that
are applied to messages in the system
138
139
Receive Message
Filter
Message
Lookup
Mechanism
Set
Destination
Route to
Destination
140
141
A
Fred Smith,
Graphics Card,
32, 1.50,
07/11/06
[Customer, Order,
Quantity, Price, Date]
B
C
<order>
<name>Mr. Smith</name>
<item>Graphics Card</item>
<quantity>32</quantity>
<price>1.05</price>
<date>11/07/06</date> 142
</order>
142
Simple
Extensible
Standards Based
143
Appl.
A
Transform
Original
Message
Transform message
Transformation
Node
Augment
Q1
Input
Node
Warehouse
Warehouse
Node
Warehoused
Message
Augment message
Database
Node
Q2
Output
Nodes
Reformatted
/ Reshaped
Message
Augmented
Message
Q3
Appl.
B
Appl.
C
Content accessed
from database
Database
Content
144
145
146
147
Mapping
XSLT
ESQL
Java
PHP
.NET
148
XML
<order>
<name>
<first>John</first>
<last>Smith</last>
</name>
<item>Graphics Card</item>
<quantity>32</quantity>
<price>200</price>
<date>07/11/08</date>
</order>
Logical
Order
Name Item
String
CSV
Custom
Qty
Integer
Price Date
Integer
Date
John,Smith,Graphics Card,
32,200,07/11/08
John Smith............
Graphics Card.........
3220020071108.........
First
Last
String
String
149
C Header
COBOL
Copybook
WSDL
Pre-built
XML
Schema
DTD
Enterprise
Information
System
(SAP, Siebel,
PeopleSoft)
Define
your own
using the
Eclipse-based
Tooling
WebSphere
Transformation
Extender
File Import
Message Set
Type tree
Parsers
Message Broker
150
Describe powerful
transformations
quickly
Uses Java
programming
language
Uses SQL-based
language (ESQL)
Run a WebSphere
Transformation
Extender map
151
152
152
Protocols
Message Formats
Mediation Patterns
Enterprise Messaging
Messaging Transmission
154
Message Brokering
Message Broker offers various kinds of processing nodes:
AppA
QM A
QM BRK1
Message Broker
(MQ)
Input
comma
separated
Message
Flow
App B
CWF
Compute
(MQ)
Output
Compute
(MQ)
Output
QM B
Filter
xml
QM C
XML
App C
155
156
157
158
159
Publisher 2
Bus Schedules
Train Schedules
Published information
is subscribed to and
then received by the
subscribers
Subscriber 1
Train Schedules
Schedules are
published to the
broker
Broker
Subscriber 2
Train and Bus
Schedules
160
Publisher 2
Bus Schedules
Train Schedules
Broker 1
Publisher 3
Plane
Schedules
Broker 2
Subscriber 1
Subscriber 2
Bus
Schedules
Subscriber 3
All Schedules
161
162
WebSphere MQ Interoperability
Single Administrative explorer
for WebSphere Message
Broker and WebSphere MQ
Operations and security.
Publish /Subscribe topology
defined with WebSphere MQ
v7 facilities.
Support and exploitation of
WebSphere MQ Multiple
Instance Queue Managers for
high availability.
163
164
165
166
Development Environment
The development environment is where the message flow
applications that provide the logic to the broker are developed.
The broker uses the logic in the message flow applications to
process messages from business applications at run time.
In the Message Brokers Toolkit, you can develop both message
flows and message sets for message flow applications.
Development Environment comprises of the following
components
Message Flows
Message Sets
Broker Application Perspective
167
169
170
171
Output target
(Failure)
Scalable
Transactional
Input source
Output target
Transform
Output target
172
Nodes
Performs a different
(input, output or processing) action
Routing decision
is made based on
a field described
in the incoming
message
173
ExceptionList
Transactional?
Y
rollback to inputQ
MQMD.BackoutCount >
Queue BOTHRESH
1. Input node's
FAIL path
N
2.
BackoutCount >BackoutQ
2 *Y BOTHRESH
3.
DeadLetterQ
inputQ
174
175
176
Perspectives
Toolkit Help
Projects
Node Palette
Brokers
Properties
Problems
Deployment Log
178
Runtime Environment
The runtime environment is the set of components that are
required to deploy and run message flow applications in the
broker.
Runtime Environment comprises of below components:
Broker
Execution Groups
Configuration Manager
Broker Domain
User Name Server
Broker Administration perspective
179
181
182
183
184
185
186
187
188
189
Message
Brokers
Toolkit
Broker
Administration
Broker
Domain
Config.
Manager
Broker
Controller
App.
App.
Repository
User Name
Server
Administrative
Agent
Execution Groups
App.
Message
Flows
Dictionaries
(Msg Sets)
"Root
"
App.
"Root
"
"Body
"
"Root
"
"Body
"
Repor
t
"Bod
y"
Repor
t
Repo
rt
190
191
192
193
Message Enablement
File Processing
Service Virtualization
Message Brokering
Event Processing
OR
OR
OR
194
Agenda
Introduction
Capabilities
Broker Properties
Message Flow Properties
Message Flow Revisited
Predefined and self-defining messages
Why Model Messages?
Message Model
Modeling Messages Advantages
Message Broker Parsers
Message Processing Nodes
Message Tree
How the Message Tree is populated?
197
Agenda contd
Logical Tree Structure
198
WebSphere MQ Explorer
The Message Broker Explorer displays information about the
broker environment, information about the defined execution
groups, and information about the deployed applications..
199
WebSphere MQ Explorer
201
Broker Properties
202
203
Self-defining messages
You can create and route messages that are self-defining. The best
example of a self-defining message is an XML document.
You can also model self-defining messages in the WebSphere
Message Broker Toolkit. However, you do not need to deploy these
message sets to the brokers that support those message flows.
206
Messages that can be parsed without a model; these are called selfdefining messages.
207
208
Message Model
Physical message format
("wire format")
self-defining
"Body"
"Body"
undefined
Parsed
Order
Order
Order #
Order #
predefined
Supplier
Supplier
Constructed
Name
Name
Address
Address
Message
NEON
Repository Manager
(MRM)
Item
Item
209
210
213
Together, these values identify the structure of the data that the
message contains.
The broker requires access to a parser for every message
domain to which your input messages and output messages
belong. Parsers are called when required by the message flow.
214
MRM
DataObject
BLOB
IDOC
JSON
DFDL
215
S m i t h , G r a p h i c s
C a r d
Parser converts
logical structure
to bit-stream
Parser converts
bit-stream to
logical structure
< o r d e r > < n a m e > M r . S m i t h < / n
Model
Output Message
Bit-stream
Output
Message Bit-stream
217
struct {
int height;
int age;
char Name[48];
} Person;
172
32
Joe Bloggs
218
DataInsert
Compute
Java
Compute
String personAge =
(String)assembly.getMessage().evaluateXPath(/Body/Person/Age);
219
Message Tree
A message tree is a structure that is created, either by one or
more parsers when an input message bit stream is received by a
message flow, or by the action of a message flow node.
A message is used to describe:
A set of business data that is exchanged by applications
A set of elements that are arranged in a predefined structure
A structured sequence of bytes
220
221
222
Root
Properties
MQMD
MessageSet = MessageSet-ID
MessageType = MessageID
MessageFormat = Physical format layer ID
ReplyToQ
Format ='MQHRF2
'
MQRFH2
mcd Msd = 'MRM '
= 'BLOB'
Set = MessageSet-ID
Type = MessageID
Fmt = Physical format layer ID
(Body)
XMLNSC
Message
Name
Version
Complaint
Type
MRM
Version
Name
Complaint
Type
BLOB
223
My_Set_Project
My_Set
messageSet.mset
My_AddressesMsg.mxsd
AddressesMsg
Root
Properties
MessageSet
MessageType
t_AddressesMsg
My_Set
AddressesMsg
MQMD
MRM
HomeAddress
Line
Country
Zip
WorkAddress
Line
Country
Zip
HomeAddress
WorkAddress
t_Address
Line
Country
Zip
xsd:string
224
The first of these trees is populated with the contents of the input
message bit stream, the remaining three trees are initially empty.
Each of the four trees created has a root element
Each tree is made up of a number of discrete pieces of
information called elements.
The root element has no parent and no siblings
The root is parent to a number of child elements. Each child
must have a parent, can have zero or more siblings, and can
have zero or more children.
225
226
229
231
232
233
<ISBN>0123456789</ISBN>
<Book_Price>15.99</Book_Price>
<ISBN>1425112342</ISBN>
<Book_Price>7.99</Book_Price>
<ISBN>9736316345</ISBN>
<Book_Price>25.99</Book_Price>
</Book_Details>
</Create_Book_Order_MSG>
234
235
<Customer_ID>0123456789</Customer_ID>
<Order_Number>0123456789TIMESTAMP '2002-10-20
12:00:00'</Order_Number>
<Order_Date>2002-10-20T12:00:00-08:00</Order_Date>
<Airmail>Yes</Airmail>
<Delivery_Price>8</Delivery_Price>
<Book_Details>
<ISBN>0123456789</ISBN>
<Book_Price>15.99</Book_Price>
<ISBN>1425112342</ISBN>
<Book_Price>7.99</Book_Price>
<ISBN>9736316345</ISBN>
<Book_Price>25.99</Book_Price>
</Book_Details>
<Total_Price>49.97</Total_Price>
<Order_Status>Order Received</Order_Status>
</Book_Order_Response_MSG>
236
237
238
Agenda
241
242
243
245
246
247
248
249
251
Helper Files
Helper files maintain information that supports other activities
.broker files contain definitions of broker connections.
.bar files contain deployable and other files that you have chosen to
send to a broker.
.mbtest files contain the steps that define a test that you use with the
Test Client to debug your applications.
252
253
254
Agenda
WebSphere MQ
WebServices
HTTP
Routing
Transformation
Construction
Validation
257
258
Node Types
Built-in nodes encapsulate transports, technologies and applications
Our intent is always to make the common tasks easy, and the rest
possible!
Use the built-in nodes to reduce the amount of custom code required
This makes best use of the built-in facilities like activity trace and
resource statistics
259
Node Types
Nodes represent both logical end points and processing functions
User-defined nodes can be written in Java, C/C++ and also as subflows
260
node
input
connector
Action
input
message
tree
input
terminal
output
terminals
output
message
trees
262
263
Built-in Nodes
Various nodes wired together to forms a message flow
WebSphere Message Broker supplies built-in nodes that you
can use to define your message flows.
Each node has its specific task to do in message flow Various
regularly used inbuilt nodes are discussed in following sections
Depending on functionality, nodes can be roughly categorized in
following groups
WebSphere MQ
JMS
HTTP
WebServices
SCA
WebSphere Adapters
Routing
Validation
Security
Transformation
Construction
Database
File
Email
TCP/IP
CORBA
IMS
Timer
CICS
264
Built-in Nodes
For ease, again they have been categorized in to:
Input Nodes
Output Nodes
Nodes for manipulating, enhancing, and transforming messages
Decision making nodes
Nodes for controlling time-sensitive operations
Error handling and reporting nodes
Other Nodes
265
WebSphere MQ
The following list of nodes will be covered in this section
MQInput
MQOutput
MQReply
MQGet
MQHeader
266
WebSphere MQ MQInput
The MQInput node receives a message from a WebSphere MQ message
queue that is defined on the queue manager of the broker.
The node uses MQGET to read a message from a specified queue, and
establishes the processing environment for the message.
The MQInput node handles messages in the following message domains:
DFDL
XMLNSC
DataObject
JSON
BLOB
MIME
MRM
JMSMap
JMSStream
XMLNS
267
Out
268
WebSphere MQ MQOutput
MQOutput
Use an MQOutput node if the target application expects to receive messages on a
WebSphere MQ queue, or on the WebSphere MQ reply-to queue that is specified
in the input message MQMD
The node uses MQPUT to put the message to the destination queue or queues
that you specify.
You can configure the MQOutput node to put a message to a specific
WebSphere MQ queue that is defined on any queue manager that is accessible by
the queue manager for the broker, or to the destinations identified in the local
environment that is associated with the message.
269
In
270
WebSphere MQ MQReply
MQReply
The MQReply node is a specialized form of the MQOutput node that puts the
output message to the WebSphere MQ queue that is identified by the ReplyToQ
field of the input message header.
Use an MQReply node if the target application expects to receive messages on the
WebSphere MQ reply-to queue that is specified in the input message MQMD.
271
In
272
WebSphere MQ MQGet
MQGet
Use an MQGet node if the messages arrive at the broker on a WebSphere MQ
queue and the node is not to be at the start of a message flow.
The MQInput node handles messages in the following message domains:
DFDL
XMLNSC
DataObject
JSON
BLOB
MIME
MRM
JMSMap
JMSStream
XMLNS
273
Failure
Out
Description
The input terminal that accepts the message that is being
processed by the message flow.
The output terminal to which the input message is routed if an
error (with a CC that indicates an error that is more severe than a
warning) occurs in the node while trying to get a message from
the queue.
The output terminal to which the message is routed if it is
retrieved successfully from the WebSphere MQ queue.
Warning
No
Message
274
WebSphere MQ MQHeader
MQHeader
Use the MQHeader node to add, modify, or delete MQ Message Descriptor
(MQMD) and MQ Dead Letter Header (MQDLH) headers.
You can add or remove a whole header, or you can change only certain fields in a
header. You can set these fields to a fixed value, or to a value specified by an
XPath expression to access a value in one of the message trees. XPath is used to
provide a valid location from which a value for a property can be copied. For
example, the location can be the body of the message, the local environment tree,
or an exception list.
275
Terminal
In
Failure
Out
Description
The input terminal that accepts a message for processing by the
node.
The output terminal to which the input message is routed if a
failure is detected.
The output terminal to which the transformed message is routed
if the input message is processed successfully.
276
WebServices
The following list of nodes will be covered in this section
SOAPInput node
SOAPReply node
SOAPRequest node
SOAPEnvelope node
SOAPExtract node
277
WebServices SOAPInput
SOAPInput
Use the SOAPInput node to process client SOAP messages, so that the broker
operates as a SOAP Web Services provider.
The SOAPInput node is typically used with the SOAPReply node, which can be
included in the same message flow, or a different flow in the same execution
group.
You can connect a SOAPReply node to the Out terminal to handle successful
responses. If you also want your message flow to handle reply processing after a
timeout, connect a SOAPReply node to the HTTP Timeout terminal.
The SOAPInput node can be used in a message flow that accepts and processes
SOAP messages. The node is configured using deployable WSDL. Look at the
following sample to see how to use this node:
A client can send an HTTP GET to the web service endpoint exposed by the
SOAPInput node, suffixed with a query string ?wsdl, and receive a response with
the WSDL definition used to configure the flow;
278
Description
Failure
Out
279
WebServices SOAPReply
SOAPReply
Use the SOAPReply node to send SOAP messages from the broker to the
originating client in response to a message received by a SOAPInput node.
The SOAPReply node is typically used with the SOAPInput node, which can be
included in the same message flow, or a different flow in the same execution
group.
The SOAPReply node can be used in any message flow that needs to send SOAP
messages from the broker to the originating client in response to a message
received by a SOAPInput node. If a SOAPReply node is connected in a message
flow that receives a one-way message, the message propagates to the Failure
terminal of the SOAPReply node, and an exception is raised.
280
Terminal
Description
In
Failure
Out
281
WebServices SOAPRequest
SOAPRequest
Use the SOAPRequest node to send a SOAP request to the remote Web service.
The SOAPRequest node is a synchronous request and response node, which
blocks processing after sending the request until the response is received. This
node enables the HTTP 1.1 Keep-Alive method by default.
The SOAPRequest node can be used in any message flow that needs to call a
Web service.
282
Description
In
Failure
Out
Fault
283
WebServices SOAPEnvelope
SOAPEnvelope
Use the SOAPEnvelope node to add a SOAP envelope onto an existing message.
This node is designed to be used with the SOAPExtract node.
The default behavior of the SOAPEnvelope node is to attach the SOAP envelope
from a standard location ($LocalEnvironment/SOAP/Envelope) in the local
environment tree; you can specify an explicit location by using an XPath
expression.
You can also use the node in a flow without a corresponding SOAPExtract node;
the node has an option to create a default SOAP envelope.
This node is designed to be used in conjunction with the SOAPExtract node
This node is designed to work with SOAP messages. Use one of the following
parsers:
XMLNSC
MRM
XMLNS
Other XML parsers are not supported because they do not support namespaces.
An exception is thrown if a message is received which is not using the correct
parser or does not conform to the basic structure of a SOAP message.
Full validation is not done on the SOAP message, which just needs to contain a
body element.
284
Terminal
In
Out
Failure
Description
The input terminal that accepts a SOAP message for processing
by the node.
The output terminal that outputs the SOAP message that was
constructed from the SOAP message body and a SOAP envelope.
The output terminal to which the message is routed if a failure is
detected during processing.
285
WebServices SOAPEnvelope
Example SOAP Messages:
286
WebServices SOAPExtract
SOAPExtract
Use the SOAPExtract node to remove SOAP envelopes, allowing just the body of a
SOAP message to be processed. It can also route a SOAP message based on its
operation name. Both functions are optional; they are contained in one node
because they are often used together.
Routing function
The SOAP message is routed to a Label node in the message flow as identified by the
SOAP operation in the message. The SOAP Operation is identified in the SOAP body tag.
287
WebServices SOAPExtract
Ensure that the message parser options in the properties folder of the
outgoing message are correctly set up to parse the message, by copying
the message set and message format from the incoming message.
The message type is derived from the SOAP envelope message body first
child.
This node is designed to work with SOAP messages. Use one of the
following parsers:
SOAP
XMLNSC
MRM
XMLNS
Other XML parsers are not supported because they do not support
namespaces. An exception is thrown if a message is received which is not
using the correct parser or does not conform to the basic structure of a
SOAP message.
Full validation is not done on the SOAP message, which just needs to
contain a body element.
288
Terminal
In
Out
Failure
Description
The input terminal that accepts a SOAP message for processing
by the node.
The output terminal that outputs the SOAP message body (without
the envelope if the Remove envelope check box is selected on the
node properties).
The output terminal to which the message is routed if a failure is
detected during processing.
289
HTTP
The following list of nodes will be covered in this section
HTTPInput node
HTTPReply node
HTTPRequest node
HTTPHeader node
290
HTTP HTTPInput
HTTPInput
Use the HTTPInput node to receive an HTTP message from an HTTP client for
processing by a message flow.
If you use the HTTPInput node with the HTTPReply and HTTPRequest nodes, the
broker can act as an intermediary for web services, and web service requests can
be transformed and routed in the same way as other message formats that are
supported by WebSphere Message Broker.
Web service requests can be received either in standard HTTP (1.0 or 1.1) format
or in HTTP over SSL (HTTPS) format.
The HTTPInput node supports HTTP POST and HTTP GET.
If your message flows are processing SOAP messages, use the SOAP nodes in
preference to the HTTPInput node to take advantage of enhanced features,
including WS-Addressing and WS-Security.
291
HTTP HTTPInput
The HTTPInput node handles messages in the following message domains:
MRM
XMLNSC
XMLNS
MIME
BLOB
XML (this domain is deprecated; use XMLNSC)
JSON
DFDL
292
Description
The output terminal to which the message is routed if an error
occurs.
The output terminal to which the message is routed if it is
successfully retrieved.
293
HTTP HTTPReply
HTTPReply
Use the HTTPReply node to return a response from the message flow to an HTTP
client. This node generates the response to an HTTP client from which the input
message was received by the HTTPInput node, and waits for confirmation that it
has been sent.
The HTTPReply node can be used in a message flow that sends a response to an
inbound HTTP or HTTPS messages. The most common example of this scenario is
a message flow that implements a Web service.
By default, HTTP messages are handled by the broker-wide listener, which is
started when a message flow that includes HTTP nodes is started. All inbound and
outbound HTTP messages are routed through this listener, for all HTTP nodes
deployed to all message flows in all execution groups on the broker.
294
Terminal
Description
In
Failure
Out
295
HTTP HTTPRequest
HTTPRequest
Use the HTTPRequest node to interact with a web service.
The HTTPRequest node interacts with a web service, using all or part of the input
message as the request that is sent to that service. You can also configure the
node to create an output message from the contents of the input message,
augmented by the contents of the web service response, before you propagate the
message to subsequent nodes in the message flow.
Depending on the configuration, this node constructs an HTTP or an HTTP over
SSL (HTTPS) request from the specified contents of the input message, and sends
this request to the web service. The node receives the response from the web
service, and parses the response for inclusion in the output tree. The node
generates HTTP headers if they are required by your configuration.
296
DFDL
XMLNSC
JSON
BLOB
MIME
MRM
XMLNS
The HTTPRequest node treats the 100 series status codes as a 'continue'
response, discards the current response, and waits for another response from the
web server.
The 200 series status codes are treated as success, the settings on the various
tabs on the node determine the format of the output message that is generated,
and the response is routed to the Out terminal of the node.
297
298
Description
In
Failure
Out
Error
299
HTTP HTTPHeader
HTTPHeader
Use the HTTPHeader node to add, modify, or delete HTTP headers such as
HTTPInput, HTTPResponse, HTTPRequest and HTTPReply.
The HTTPHeader node provides a toolkit interface to manipulate HTTP headers
without any need for coding; it does not modify the message body.
You can add or remove a whole header, or selected header properties. You can
set the properties to a fixed value, or to a value specified by an XPath expression
that accesses a value in one of the message trees. XPath is used to provide a valid
location from which a value for a property can be copied.
For example, the location can be the body of the message, the local environment
tree or exception list. HTTPInput and HTTPResponse headers can only be deleted
or carried forward from the incoming message; their header properties cannot be
modified or added to.
300
Terminal
In
Failure
Out
Description
The input terminal that accepts a message for processing by the
node.
The output terminal to which the input message is routed if a
failure is detected during extraction.
The output terminal to which the transformed message is routed
if the input message is processed successfully.
301
Routing
The following list of nodes will be covered in this section
Filter node
Label node
Publication node
RouteToLabel node
Route node
AggregateControl node
AggregateReply node
AggregateRequest node
Collector node
Resequence node
Sequence node
302
303
Description
In
Failure
Unknown
False
True
304
Intelligent Routing of
messages within flows is
possible using the
RouteToLabel or Filter
methods
If using a Filter method be
sensitive to the relative
volumes of each message
type likely to be passed
through the flow.
Design flows so the
majority of messages flow
through the minimum
number of possible nodes
305
306
Description
In
Match
Default
Failure
307
Transformation
The following list of nodes will be covered in this section
.NETCompute node
Mapping node
XSLTransform node
Compute node
JavaCompute node
PHPCompute node
308
You can modify elements of the message body data, its associated environment,
and its exception list.
Use the Mapping node to:
Build a new message
Copy messages between parsers
Transform a message from one format to another
309
310
Description
In
Failure
Out
311
312
Description
The input terminal that accepts a message for processing by the
node.
The output terminal to which the input message is routed if an
unhandled exception occurs during the computation.
Out
Out1
Out2
Out3
Out4
314
Description
The input terminal that accepts a message for processing by the
node.
The output terminal to which the input message is routed if a
failure is detected during the computation. (Even if the Validate
property is set, messages that are propagated to the Failure
terminal of the node are not validated.)
Out
Alternate
315
Construction
The following list of nodes will be covered in this section
Input node
Output node
Throw node
Trace node
TryCatch node
FlowOrder node
Passthrough node
ResetContentDescriptor node
316
317
Description
The input terminal that delivers a message to the subflow.
318
319
Description
The output terminal that defines an out terminal for the subflow.
320
Include a Throw node to force an error path through the message flow if the
content of the message contains unexpected data. For example, to back out
a message that does not contain a particular field, you can check (using a
Filter node) that the field exists; if the field does not exist, the message can
be passed to a Throw node that records details about the exception in the
exception list subtree in the message.
321
Description
The input terminal that accepts a message for processing by the
node.
322
323
Description
The input terminal that accepts a message for processing by the
node.
The output terminal through which the message is propagated.
324
325
Description
The input terminal that accepts a message for processing by the
node.
Catch
Try
326
327
Description
In
Failure
First
Second
328
329
330
331
332
Agenda
Todays Enterprise IT Environment
Why Interfaces are so expensive to build and maintain?
Service Oriented Architecture Revisited
WebSphere MQ Universal Messaging Backbone
WebSphere MQ connects virtually anything
Did you know?
Program-to-Program Communication
How does WebSphere MQ Work?
Synchronous Communication Model
Asynchronous Communication Model
Program-to-Program Communication Factors
Three Styles of Communication
WebSphere MQ Eliminates application network concerns.
Local and Remote Queue Concept
335
Agenda contd
Message Queue Interface
Message Queue Interface Calls
Message Composition
Message Types
Message Persistence
Queue
Queue Manager
Message Queues Types
Queues Expiry
Message Broker User Roles
Deployment process using Message Broker Explorer
Deployment Process using MQ Explorer
Message Broker Queue Explorer
WebSphere Message Broker Environments
336
Introduction to WebSphere MQ
Todays Enterprise IT Environment
337
How do I
optimize my
business
processes?
How do I
integrate to
my existing
systems?
339
340
IBM standard
Microsoft
.NET (C#)
Open standard
IBM de facto
JMS (Java)
MQ Interface
RPG, COBOL,
WebSphere MQ
HP-UX
Windows
zLinux
Solaris
AIX
zOS
OS/400
Linux
NSS OVMS
342
Program-to-Program Communication
IBM WebSphere MQ is a means of program-to-program
communication.
Program A prepares a message and puts it on a queue. Program
B then gets the message from a queue and processes it.
Both Program A and Program B use an application programming
interface (API) to put messages on a queue and get messages
from a queue.
The IBM WebSphere MQ API is called the Message Queue
Interface (MQI).
343
Message
Queue
Application A
Application Z
Q Manager
Channels
Q Manager
344
346
347
348
349
Time Independence
350
351
352
WebSphere MQ
Eliminates application network concerns.
353
354
355
356
Message Composition
Set by application and queue manager
Header
MQMD
Application data
Any sequence of bytes
Meaningful only to the sending and receiving applications
Not meaningful to the queue manager
357
358
359
Message Types
MQ Series knows four types of messages:
Datagram
A message containing information for which no response is
expected.
Request
A message for which a reply is requested.
Response
A reply to a request message.
Report
A message that describes an event such as the occurrence of
an error or a confirmation on arrival or a delivery.
360
Message Persistance
361
Queue
Queue is a data structure in which the messages are stored.
Messages can be put on, or got from, the Queue by applications
by a Queue Manager.
Queues exists independently of the applications that use them,
whether the applications are active or inactive, Queue can store
messages.
Queue belongs to a Queue Manager, which is responsible for
maintaining that Queue.
362
Queue Manager
Heart of MQSeries Runtime program.
Job is to manage queues of messages.
363
Message Queues
Queues are defined as objects belonging to a Queue Manager.
Local Queue
Remote Queue
Transmission Queue
Dynamic Queue
Alias Queue
Model Queue
Initiation Queue
Reply-To Queue
Dead-Letter Queue
Event Queue
Command Queue
364
365
366
Queues Expiry
367
368
Complete Application
Development (AD) and Design,
Code Unit Test environment
Administration perspective
replaced with design, code, unit
test
Create message flows and
related artifacts Create,
customize and deploy barfiles
369
Deploy barfile
Deployment takes place in background
Deployment log updates when complete
370
372
373
Introduction to ESQL
Agenda
Prerequisites
ESQL Overview & Concepts
Datatypes
Variables
Operators
Statements
Functions & Procedures
Field References
Modules
Reserved Words
Non Reserved Words
Special Characters
Pre-requisites
Knowledge in SQL, Stored Procedures.
377
What is ESQL ?
Extended Structured Query Language (ESQL) is a programming
language defined by WebSphere Message Broker to define and
manipulate data within a message flow.
ESQL is based on Structured Query Language (SQL) which is in
common usage with relational databases such as DB2.
ESQL extends the constructs of the SQL language to provide
support for you to work with message and database content to
define the behavior of nodes in a message flow.
You can use the ESQL code in the following nodes:
Compute Node
Database Node
Filter Node
378
What is ESQL ?
You can also use the ESQL code in the following nodes:
DataDelete Node
DataInsert node
DataUpdate node
Extract node
Mapping node
Warehouse node
379
ESQL Concepts
To use ESQL correctly and efficiently in your message flows, you
must also understand the following concepts
Datatypes
Variables
Operators
Statements
Functions
Procedures
Constants
Field References
Modules
Reserved Words
Non Reserved Words
Special Characters
380
ESQL Datatypes
A data type defines the characteristics of an item of data, and
determines how that data is processed. ESQL supports six data
types
BOOLEAN (TRUE, FALSE, UNKNOWN)
DATETIME
ESQL supports several data types that handle datetime values.
DATE
TIME
GMTTIME
TIMESTAMP
GMTTIMESTAMP
INTERVAL
NULL
NUMERIC
DECIMAL, FLOAT, INTEGER
381
STRING
BIT, BLOB, CHARACTER
382
ESQL Variables
An ESQL variable is a data field that is used to help process a
message.
You must declare a variable and state its type before you can use it.
The data type of a variable is fixed; if you code ESQL that assigns a
value of a different type, either an implicit cast to the data type of
the target is implemented or an exception is raised (if the implicit
cast is not supported).
Their use is defined in the DECLARE statement.
The names of ESQL variables are case-sensitive;
The simplest way to guarantee that you are using the correct case
is always to define variables using uppercase names.
383
Normal variables
Normal variables have a lifetime of just one message passing through a
node.
They are visible to that message only.
To define a normal variable, omit both the EXTERNAL and SHARED
keywords.
384
ESQL Operators
An ESQL operator is a character or symbol that you can use in
expressions to specify relationships between fields or values.
Simple comparison operators
>, <, >=, <=, =, and <>
Complex comparison operators
BETWEEN, EXISTS, IN, IS, LIKE
Logical operators
AND, OR, NOT
386
ESQL Statements
You can use ESQL statements to manipulate message trees,
update databases, or interact with nodes.
Basic statements
Message tree manipulation statements
Database update statements
Node interaction statements
Other statements
388
ESQL Statements
Basic
Statements
BEGIN END
CALL
CASE
CREATE FUNCTION
CREATE MODULE
CREATE
PROCEDUCE
DECLARE
IF
ITERATE
LEAVE
LOOP
REPEAT
RETURN
SET
THROW, WHILE
Message
Tree
Manipulation
Statements
ATTACH
CREATE
DELETE
DETACH
FOR
MOVE
Database
Update
Statements
DELETE FROM
INSERT
PASSTHRU
UPDATE
Node
Interaction
Statements
PROPAGATE
Other
Statements
BROKER SCHEMA
DECLARE
HANDLER
EVAL
LOG
RESIGNAL
389
Example
390
You can use the CALL statement to invoke a routine that has been
implemented in all the following ways:
ESQL.
Java.
As a stored procedure in a database.
391
393
394
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/c
om.ibm.etools.mft.doc/ak04965_.htm
395
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/c
om.ibm.etools.mft.doc/ak04970_.htm
396
CONSTANT
DataType
EXTERNAL
NAME
NAMESPACE
SHARED
397
DataType
BOOLEAN
INT
INTEGER
FLOAT
DECIMAL
DATE
TIME
TIMESTAMP
GMTTIME
GMTTIMESTAMP
INTERVAL
CHAR
CHARACTER
BLOB
BIT
ROW
REFERENCE TO
398
NAMESPACE
Use NAMESPACE to define an alias (an alternative name) by which a
namespace can be known.
Example
This example illustrates a namespace declaration, its use as a SpaceId in a
path, and its use as a character constant in a namespace expression:
DECLARE prefixOne NAMESPACE 'http://www.example.com/PO1';
-- On the right hand side of the assignment a namespace constant
-- is being used as such while, on the left hand side, one is
-- being used as an ordinary constant (that is, in an expression).
SET OutputRoot.XMLNS.{prefixOne}:{'PurchaseOrder'} =
InputRoot.XMLNS.prefixOne:PurchaseOrder;
400
401
402
SET i = i + 1;
UNTIL
FALSE
END REPEAT;
404
406
RETURN TRUE;
RETURN FALSE;
Propagate message
Compute
Stop propagation
to Out terminal.
Propagate message
Database
Stop propagation
to Out terminal.
Filter
RETURN;
Stop propagation
Deploy failure
(BIP2912E: Type
mismatch on RETURN)
Stop propagation
Deploy failure
(BIP2912E: Type
mismatch on RETURN)
Propagate
Deploy failure
Propagate message
Propagate message
message to False
(BIP2912E: Type
to True terminal
to Unknown terminal
terminal
mismatch on RETURN)
407
RETURN NULL;
(or return
RETURN expression;
expression that
evaluates to NULL)
User
Returns control to
defined
Returns control
the calling
function or
to the calling
procedure
expression with
expression with
with a
the value of
NULL
RETURNS
expression
clause
User
Deploy failure
defined
(BIP2401E:
function or
procedure
Syntax error:
without a
expected ; but
RETURNS found expression)
clause
Deploy failure
(BIP2401E:
Syntax error:
expected ; but
found NULL)
RETURN;
No RETURN statement
Deploy failure
(BIP2912E: Type
mismatch on
RETURN)
Returns control to
the calling
expression
409
--
-- order will need to be handled differently (discount given) so return TRUE --- or FALSE depending on the size of the order
--
410
411
If you want to assign a NULL value to a field without deleting the field, use
a statement like this:
SET OutputRoot.XMLNS.Order.Name VALUE = NULL;
412
Examples
THROW USER EXCEPTION;
THROW USER EXCEPTION CATALOG 'BIPmsgs' MESSAGE 2951;
413
414
<Data>
<Order>
<Item>bread</Item>
</Order>
<Order>
<Item>garlic</Item>
<Item>wine</Item>
<Item>cheese
<Type>stilton</Type>
</Item>
</Order>
</Data>
416
418
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.
etools.mft.doc/ak05090_.htm
419
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.i
bm.etools.mft.doc/ak05110_.htm
420
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm
.etools.mft.doc/ak04915_.htm
421
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.
etools.mft.doc/ak05020_.htm
422
423
ESQL Functions
1
425
Functions, Procedures
Functions
A function is an ESQL construct that calculates a value from a
number of given input values.
A function usually has input parameters and can, but does not
usually have, output parameters.
It returns a value calculated by the algorithm described by its
statement. This statement is usually a compound statement, such as
BEGIN... END, because this allows an unlimited number of nested
statements to be used to implement the algorithm.
ESQL provides a number of predefined, or "built-in", functions which
you can use freely within expressions. You can also use the CREATE
FUNCTION statement to define your own functions.
When you define a function, you must give it a unique name.
Example:
SET Diameter = SQRT(Area / 3.142) * 2;
426
427
428
429
END IF;
430
ALL
ASYMMETRIC
BOTH
CASE
DISTINCT
FROM
ITEM
LEADING
NOT
SYMMETRIC
TRAILING
WHEN
431
432
433
434
435
437
Agenda
Messages in WebSphere Message Broker
ESQL and the ESQL editor in the Message Brokers Toolkit
Defining the logic of a message flow using ESQL
Inserting data into a database using a message flow
LAB 1 - Simple Hello World Application
LAB 2: Bookstore Message Flow Application
440
441
442
ESQL Editor
443
444
445
Example
Page (79-94), WebSphere Message Broker Basics (sg247137).pdf
446
447
448
449
450
Agenda
The Java Compute Node
Java and the Java editor in the Message Brokers Toolkit
Inserting data into a database using a message flow
Transforming a message from one XML structure to another
LAB 3 - Simple Hello World Application
LAB 4 - Connecting with Database (Bookstore Application)
453
454
455
456
457
458
459
Example
Page (101-110), WebSphere Message Broker Basics
(sg247137).pdf
460
461
462
463
464
Agenda
Message Sets and Message Definitions
The Message Set Editor
The Message Definition Editor
The Message Mapping Editor
LAB 5 - Simple Hello World Application
LAB 6 - Simple Mapping Concept
467
468
469
470
471
472
473
474
475
476
477
478
Agenda
Message Broker Installation
Startup Configurations Windows 7
Startup Configurations Windows XP
483
484
485
486
487
488
489
490
491
492
494
495
NOTE: You have to perform this step every time you restart your machine.
496
497
498
499
500
501
502
503
Note: You dont need to add your names to the above groups whenever the
system restarts, except for Administrator Group. You have to add your
Name to Administrators Group every time you restart your machine.
504
505
506
507
508
Agenda
Creating Default Configuration
Deleting Default Configuration
Creating Broker
Creating MQ Queues
Linking Queues to the Message Flow
Packaging Applications
Deploying Applications to Broker
Testing using Test Client
Testing with SoapUI Interface
Debugging Message Flow Applications
511
512
513
514
515
516
517
518
519
520
Manual Creation
Creating Broker
Creating MQ Queues
Linking Queues to the Message Flow
Packaging Applications
Deploying Applications to Broker
521
Manual Creation
Creating Broker
In order to create a Broker, you must have a MQ Queue Manager
created first. So lets create Queue Manager first.
Navigate to MQ Explorer, right click on Queue Manager New
Queue Manager
522
Manual Creation
Creating MQ Queue Manager(contd)
523
Manual Creation
Creating MQ Queue Manager(contd)
524
Manual Creation
Creating MQ Queue Manager(contd)
525
Manual Creation
Creating MQ QM(contd)
526
Manual Creation
Creating Broker
Upon successful creation of MQ Queue, lets create Broker.
Open the IBM WebSphere Message Broker Toolkit.
Right click on the Brokers in the Brokers Tab in the left bottom corner.
Select New Local Broker ; Click on Finish.
527
Manual Creation
Creating Broker (contd)
After entering all the details click on finish
The Broker Creation will get started.
528
Manual Creation
Creating Broker (contd)
Upon successful creation of Broker, you will see the following wizard.
Click on Close to end the wizard.
529
Manual Creation
Creating Broker (contd)
Upon successful creation of Broker, you will see the following wizard.
Click on Close to end the wizard.
530
Manual Creation
You could see the new broker now at two places.
The first: In the message Broker
Tool kit
531
532
Execution Group
Configuration
Manager
unzip
Broker
"Root"
"Body"
Report
533
534
535
536
537
538
Configure Dequeue
539
540
541
542
543
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.etools.
mft.doc/ag11355_.htm
Debugging ESQL
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.etools.
mft.doc/ag11360_.htm
Debugging Java
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.etools.
mft.doc/ag11370_.htm
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.etools.
mft.doc/ag66250_.htm
544
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.i
bm.etools.mft.doc/ag11186_.htm
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ib
m.etools.mft.doc/ag11186_.htm
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ib
m.etools.mft.doc/ag11080_.htm
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ib
m.etools.mft.doc/ag11420_.htm
545
546
547
548
549
550
551
552
553
554
Agenda
WebSphere Message Broker Samples
Application Samples
Technology Samples
LAB 11 Message Transformation Java Compute Node Sample (Self
Study)
LAB 12 Message Formats XMLNSC Validation sample (Self Study)
LAB 13 WebService SOAP Nodes sample (Self Study)
LAB 14 WebService RESTful Web Service Using JSON sample (Self
Study)
LAB 15 Address Book Sample (Self Study)
558
559
Navigate to:
560
561
562
Application Samples
The Application samples are small end-to-end WebSphere Message
Broker applications that were created by using the WebSphere
Message Broker Toolkit.
Technology Samples
The Technology samples are small WebSphere Message Broker
message flow applications that each show a specific feature of
WebSphere Message Broker.
Before you can use the samples you must Create the Default
Configuration
563
Application Samples
The Application samples demonstrate how to transform and
route messages through message flows.
We are going to cover the following Application Samples.
LAB 7 Error Handler Sample (Self Study)
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.eto
ols.mft.samples.errorhandler.doc/doc/overview.htm
564
Technology Samples
Each Technology sample demonstrates a specific feature of
WebSphere Message Broker; for example, how to use particular
message flow nodes, or how to use industry standard message
sets.
565
Technology Samples
We are going to cover the following Technology Samples.
LAB 11 Message Transformation Java Compute Node Sample (Self
Study)
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.etool
s.msgbroker.samplesgallery/doc/transformation.htm
Brief Description
Build it yourself
Brief Description
When you have finished with the sample, you
can remove the database,
This hyperlink is available for only those
samples, where the Database connectivity is
required.
Note: You can import or import and deploy a sample only when you use the
information center that is integrated with the WebSphere Message Broker
Toolkit.
568
Application Samples:
Airline Reservation Sample Review
Lets quickly revise the following sample.
LAB 10 Airline Reservation Sample (Self Study)
569
Application Samples:
Airline Reservation Sample Review
The Airline Reservations sample is a message flow application
based on the scenario of an airline reservation system.
You can run the Airline Reservations sample by using the supplied
self-defining XML messages.
The Airline Reservations sample demonstrates how to use a range
of message flow nodes, including the following nodes:
570
571
572
573
574
575
576
577
578
579
580
Agenda
Locating Error Information
Event Messages
Messages within the Message Broker Toolkit
Diagnostic Messages
583
584
585
586
587
588
Alerts View
589
590
591
592
593
Help Documents
Reference Books
595
Reference Library
WebSphere Message Broker Reference Library Online
596
Reference Documentation
SQL Functions
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.
etools.mft.doc/ak19550_.htm
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/index.jsp?topic
=%2Fcom.ibm.etools.mft.doc%2Fak01080_.htm
ESQL Statements
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.
etools.mft.doc/ak04900_.htm
ESQL Operators
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.
etools.mft.doc/ak01035_.htm
ESQL Datatypes
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.
etools.mft.doc/ac05920_.htm
Special characters, case sensitivity, and comments in ESQL
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.
etools.mft.doc/ak04870_.htm
ESQL Reserved Keywords
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.
etools.mft.doc/ak04880_.htm
597
Reference Documentation
ESQL NonReserved Keywords
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.
etools.mft.doc/ak04890_.htm
Test Client
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.
etools.mft.doc/af52104_.htm
Troubleshooting
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.
etools.mft.doc/au09090_.htm
Using the Select Function
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.
etools.mft.doc/ac67150_.htm
Developing Message Flow Applications
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.
etools.mft.doc/bc88710_.htm
ESQL Comparison Operators
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.
etools.mft.doc/ak01040_.htm
598
Reference Documentation
Developing ESQL
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.
etools.mft.doc/ak09030_.htm
Parsers
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.
etools.mft.doc/ac70570_.htm
WebSphere Message Broker Samples
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.
etools.mft.doc/ax20230_.htm
ESQL PDF
http://www.ibm.com/search/csass/search?q=ESQL&cc=zz&en=utf&co=us
&sn=mh&lang=en&lo=any&o=60
Interaction with Databases using ESQL
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.
etools.mft.doc/ak05800_.htm
599
Reference Documentation
Other Important Links
http://www-01.ibm.com/software/integration/wmq/wmq-library/
https://www14.software.ibm.com/webapp/iwm/web/signup.do?source=sw
app&S_PKG=mq_messaging_mm&S_TACT=109KA1PW&S_CMP=web_
ibm_ws_appint_ct_wmq-lb
http://www.ibm.com/developerworks/websphere/library/techarticles/0510_
tan/0510_tan.html
http://www-01.ibm.com/software/integration/wbimessagebroker/library/
Quick Tour:
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.
etools.mft.quicktour.doc/doc/WMB_BusinessNeeds/tour.html?noframes=t
rue
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.
etools.mft.quicktour.doc/doc/WMB_Concepts/tour.html?noframes=true
600
Reference Documentation
Other Important Links
The diagnostic messages list found in the link above is useful to find out the
cause of the error occurred during debug. You can also find this list of
errors in Tollkit's Help.
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/index.jsp?topic
=%2Fcom.ibm.etools.mft.doc%2Fay66001_.htm
Quick Tour
http://publib.boulder.ibm.com/infocenter/wbihelp/v6rxmx/topic/com.ibm.et
ools.mft.quicktour.doc/quick_tour/quick_tour.html?noframes=true
Using the new Applications and Libraries feature in WebSphere Message
Broker V8
http://www.ibm.com/developerworks/websphere/library/techarticles/1112_
quan/1112_quan.html
Routing mechanisms in WebSphere Message Broker V7
http://www.ibm.com/developerworks/websphere/library/techarticles/1107_
rajan/1107_rajan.html
601