Oracle Service Bus

Oracle Service Bus
Oracle Service Bus Core Features
• By fusing the concepts of the ESB, message brokering, and
operational services management into a single product, Oracle
Service Bus allows management and integration of messages and
services across a services network. Its core functional features are
separated into the following categories:
– Service Integration - features used for integrating disparate service
end-points, message brokering, and mediating and exposing services
for reuse
– Service Security - features used for service authentication and
authorization, message security enforcement, and user identity
validation
– Service Composition - features used for configuring message routing
logic, message transformation, service configuration, validation and
registry
– Service Management - features used for monitoring and managing
service activity and availability
Log in to Oracle Service Bus Console
• Oracle Service Bus Console is a Web services
management dashboard.
•
Properties:
– monitor Web services
– Monitor servers
– perform service management tasks.
– configuring proxy and business services
– setting up security
– managing resources
– capturing data for tracking or regulatory auditing
– views to monitor current state and health of OSB environment.
– detailed statistics about servers, services, and alerts.
– enables you respond rapidly and effectively to changes in your serviceoriented environment
To log in to Oracle Service Bus
Console
• Open a browser window and enter the
following URL to open the Oracle Service Bus
Console for the ServiceBusTutorial domain:
• http://localhost:7001/sbconsole
• Log in with Oracle Service Bus Console the
user name and password that you specified
when you created the domain.
Architecture
1. Configuration Framework
• Service Discovery
(UDDI Service Registry )
• Change Center
• Validation (Test Console )
• Resource Cache
(Resource Management )
Configuration Management
• Change Center
• Atomic sessions
• View & resolve conflicts
• Undo tasks
• Audit changes
• Import/Export
• Change propagation
• Workspace synchronization
• Test Console
• Validate changes
Change Center
•
•
•
•
•
•
•
•
•
Key to making configuration changes inside the service bus.
The Change Center has the unique ability to lock its current configuration while
changes are being made, letting the service bus continue to receive and process
requests for services while configuration changes are being made in the console.
Changes being made to the configuration do not affect the current system
configuration until they are “activated”.
View conflicts
View changes
Undo changes
View all sessions
Activate sessions
View task details
Create a Session and Set up a Project
•
Monitor resources and configurations in Oracle Service Bus environment
– Create an session in the Oracle Service Bus Console to update or delete
resources and modify their configuration properties.
– The Change Center in the console allows you to create and manage sessions.
– Allows you to perform the functions summarized in the following table:
Click
Create
Create a new session & make changes to configuration.
Edit
Enter a session that you previously created and exited. You must activate
a session before you can use Edit.
Exit
Discontinue the session and save the session state. Click Edit to re-enter
the discontinued session.
Discard
End the current session without saving the changes
Activate
Save the current session's configuration to the run time
Resource Management
• Oracle Service Bus provides the following resource management
capabilities:
– Stores information about services, schemas, transformations, WSDLs (Web
Service Definition Language), and WS Policies
– Provides centralized management and distributed access to resources and
services
– Allows browsing of services registered in Oracle Service Bus and import of
resources from WebLogic Workshop or other applications
– Allows the propagation of configuration data from environment to
environment (for example, from a development domain to a test domain to a
production domain). The system allows environment specific settings to be
overridden during import.
– Allows for better synchronization and notification capabilities.
Resources
• There are pre-defined resources types in the
OSB system environment.
Validation
• Oracle Service Bus built-in test console is a browser-based test
environment used to validate resources and inline XQuery expressions
used in the message flow.
• Using the test console, it is possible to configure the test object (proxy
service, business service, XQuery, XSLT, MFL resource), execute the test,
and view test results.
• The test console can be invoked in a number of ways in the Oracle Service
Bus Console, from:
– The Project Explorer
– The Resource Browser
– The XQuery Editor
2. Service Management
•
•
•
Monitoring Dashboard
SLA Alerts
Reporting
Monitoring Dashboard
• Gauge the current health of:
• OSB servers
• Proxy services/operations
• Message flow components
• View custom reports
• Metrics include:
• Response time
• Message throughput
• Error count
• Alert count
• Schema violations
Alerts
• Service Level Agreements (SLAs)
• Guarantee a certain level of
performance and/or quality
• Trigger reports and Alerts
• Email
• SNMP
• JMS
• Rules based on:
• Response time
• Message count
• Success/failure ratio
• Schema violations
• Security violations
3. Message Brokering
1.
2.
3.
4.
Content Based Routing (of messages)
Data Transformation
Error Handling
Service Switching
Message Brokering
Service providers and clients exchange messages with an intermediary
proxy service instead of directly with each other, eliminating
complexities resulting from heterogeneous communication protocols
and messaging formats
– XQuery-based policies or callouts to external services for message
routing
– Routing policies that apply to both point-to-point and one-to-many
routing scenarios (publish). For publish, routing policies serve as
subscription filters
XPath
• Is a standard XML expression language
Used to identify or locate portions of an XML
Document
Attributes
Elements
XQuery
• Structured language for working with XML
documents:
• Strongly typed
• Variables, operators, conditions, loops
• Library and custom functions
• Relational database queries
• Supports Xpath
Extensible Stylesheet Language
Transformations (XSLT)
• Alternative to XQuery for XML transformations:
• Loosely typed scripting language
• Does not require XML Schema
• More tolerant of malformed XML
• Supports Xpath
Communication Types
• To support heterogeneous environments, Oracle Service Bus
accommodates multiple messaging paradigms. It supports the
following types of communication:
– Synchronous request/response
– Asynchronous publish one-one
– Asynchronous publish one-many
– Asynchronous request/response (synchronous-to-asynchronous
bridging)
Business services
• Business services are Oracle Service Bus definitions of the
enterprise services that exchange messages during business
processes.
• To configure a business service, you must specify its interface, the
type of transport it uses, its security requirements, and other
characteristics.
Proxy Services
• Proxy services are OSB definitions of intermediary Web services that OSB
implements locally on Oracle WebLogic Server.
• With OSB message brokering, service clients exchange messages with an
intermediary proxy service rather than working directly with a business
service.
• A proxy service can route messages to multiple business services.
• you can configure a proxy service message flow definition to route a
message to the appropriate business service and map the message data
into the format required by the business service interface.
Message Flows
• A message flow is the implementation of a proxy service.
• You configure the logic for the manipulation of messages using proxy
service message flow definitions.
• This logic includes such activities as transformation, publishing, and
reporting, which are implemented as individual actions within the stages
of a pipeline.
Start node
• Every message flow begins with a start node.
• All messages enter the message flow through the start node, and all
response messages are returned to the client through the start node.
• There is nothing to configure in a start node.
Pipelines
• Pipeline pairs are request and response pipelines.
• The request pipeline definition specifies the actions that Oracle Service
Bus performs on request messages to the proxy service before invoking a
business service or another proxy service.
• The response pipeline definition specifies the processing that Oracle
Service Bus performs on responses from the business or proxy service that
the proxy service invokes before returning a response to a client.
• Each pipeline consists of a sequence of stages.
Stage
• Stage is a user-configured processing step.
• Messages fed into the pipelines are accompanied by a set of message
context variables that contain the message contents.
• They can be accessed or modified by actions in the pipeline stages.
Branch node
• A branch node allows processing to proceed along exactly one of several
possible paths.
• Operational branching is supported for WSDL-based services, where the
branching is based on operations defined in the WSDL.
• Conditional branching is supported for conditions defined in an XPathbased switch table.
• Two kinds of branching are supported in message flows:
• operational branching, configured in an operational branch node, and
• conditional branching, configured in a conditional branch node.
Operational Branching & Conditional
Branching
• When you create an operational branch node in a message flow, you can
build branching logic based on the operations defined in the WSDL.
• You must use operational branching when a proxy service is based on a
WSDL with multiple operations.
• Use conditional branching to branch based on a specified condition.
• Conditional branching is driven by a lookup table with each branch tagged
with simple, unique string values.
• At run time, the variable or the expression is evaluated, and the resulting
value is used to determine which branch to follow.
• If no branch matches the value, the default branch is followed.
Route Node
• A route node performs request/response communication with another
service.
• It represents the boundary between request and response processing for
the proxy service.
• When the route node dispatches a request message, the request
processing is considered complete.
• The route node supports conditional routing as well as request and
response transformations.
• Because a route node represents the boundary between request and
response processing, it cannot have any descendants in the message flow.
Actions in Stages and Route Nodes
• Actions provide instructions for handling messages in pipeline stages,
error handler stages, and route nodes.
• Based on the context actions are described in 4 different sections:
• Communication Actions
• Flow Control Actions
• Message Processing Actions
• Reporting Actions
Communication Actions
Action
Use to…
Available in…
Dynamic
publish
Publish a message to a service
specified by an XQuery expression
Pipeline stage
Error handler stage
Route node
Publish
Identify a statically specified target
Pipeline stage
service for a message and to configure Error handler stage
how the message is packaged and sent
to that service
Publish table
Publish a message to zero or more
statically specified services. Switchstyle condition logic is used to
determine at run time which services
will be used for the publish
Pipeline stage
Error handler stage
Communication Actions
Routing options
Modify any or all of the following
properties in the outbound request:
URI, Quality of Service, Mode, Retry
parameters, Message Priority
Pipeline stage
Service callout
Configure a synchronous (blocking)
callout to an Oracle Service Busregistered proxy or business service
Pipeline stage
Error handler stage
Transport headers Set the header values in messages
Pipeline stage
Error handler stage
Flow Control Actions
Action
Use to...
Available in
For each
Iterate over a sequence of values and
execute a block of actions
Pipeline stage
Error handler stage
If..then…
Perform an action or set of actions
conditionally, based on the Boolean
result of an XQuery expression.
Pipeline stage
Route node
Error handler stage
Raise error
Raise an exception with a specified error
code (a string) and description.
peline stage
Error handler stage
Resume
Resume message flow after an error is
handled by an error handler. This action
has no parameters and can only be used
in error handlers.
Error handler stage
Flow Control Actions
Action
Use to...
Available in
Reply
Specify that an immediate Pipeline stage
reply be sent to the invoker Error handler stage
Skip
Specify that at run time,
the execution of this stage
is skipped and the
processing proceeds to the
next stage in the message
flow.
Pipeline stage
Error handler stage
Message Processing Actions
Action
Use to...
Available in
Assign
Assign the result of an
XQuery expression to a
context variable
Pipeline stage
Error handler stage
Delete
Delete a context variable
or a set of nodes specified
by an XPath expression.
Pipeline stage
Error handler stage
Insert
Insert the result of an
Pipeline stage
XQuery expression at an
Error handler stage
identified place relative to
nodes selected by an XPath
expression.
Java callout
Invoke a Java method, or
EJB business service, from
within the message flow
Pipeline stage
Error handler stage
Message Processing Actions
MFL
transform
Convert message content from XML to
non-XML, or vice versa, in the message
pipeline.
An MFL is a specialized XML document
used to describe the layout of binary
data.
Pipeline stage
Error handler stage
Rename
Rename elements selected by an XPath
expression
Pipeline stage
Error handler stage
Replace
Replace a node or the contents of a
node specified by an XPath expression
Pipeline stage
Error handler stage
Validate
Validate elements selected by an XPath
expression against an XML schema
element or a WSDL resource
Pipeline stage
Error handler stage
Reporting Actions
Alert
Generate alerts based on message context Pipeline stage
in a pipeline, to send to an alert destination Error handler stage
Log
Construct a message to be logged and to
define a set of attributes with which the
message is logged
Pipeline stage
Error handler stage
Report
Enable message reporting for a proxy
service.
Pipeline stage
Error handler stage
Dynamic Message Transformation
• Oracle Service Bus supports the following capabilities for the
transformation or processing of messages:
– Validates incoming messages against schemas
– Selects a target service or services, based on the message
content or message headers
– Transforms messages based on the target service
– Transforms messages based on XQuery or XSLT
– Supports transformations on both XML and MFL messages
– Message enrichment
– Supports callouts to Web services to gather additional data for
transformation (for example, country code, full customer
records, and so on)
Service Callouts(Service Switching)
• Oracle Service Bus provides a service callout action that offers
greater flexibility for more sophisticated message flows for complex
dynamic-routing processing, or to perform message enrichment.
• The service callout action is used inside a message flow routing
stage, to call on the destination service to perform some action on
the message.
• Supports features such as:
– RPC Encoding
– URL replacement
– Java Callouts and POJOs.
Error Handling
• Oracle Service Bus supports the following error handling
capabilities:
– Configure system to format and send error messages, and return messages for
consumers of services who expect a synchronous response
– Configure error handling logic for pipeline stages, entire pipeline, and for
proxy services
– Generate alerts based on message context in a pipeline, to send to an alert
destination.
Level
Scope
Stage
Handles all the errors within a stage.
Pipeline Handles all the errors in a pipeline, along with any
unhandled errors from any stage in a pipeline.
Service Handles all the errors in a proxy service, along with any
unhandled errors in any pipeline in a service.
System Handles all the errors that are not handled any where
else in a pipeline.
Transport Errors
•
•
•
When a transport error is received from an external service and there is no error
response payload returned to Oracle Service Bus by the transport provider (for
example, in the case that an HTTP 403 error code is returned), the service callout action
throws an exception, which in turn causes the pipeline to raise an error.
Contents of the Oracle Service Bus fault Variable—Transport Error, no Error Response
Payload :
<con:fault xmlns:con="http://www.bea.com/wli/sb/context">
<con:errorCode>BEA-380000</con:errorCode>
<con:reason>Not Found</con:reason>
<con:details>
.......
</con:details>
<con:location>
<con:node>PipelinePairNode1</con:node>
<con:Pipeline>PipelinePairNode1_request</con:Pipeline>
<con:Stage>Stage1</con:Stage>
</con:location>
</con:fault>
Transport Headers in Message Flows
•
The following options are available when you configure a transport headers action:
•
The Pass all Headers through Pipeline option specifies that at run time, the
transport headers action passes all headers through from the inbound message to
the outbound message or vice versa. Every header in the source set of headers is
copied to the target header set, overwriting any existing values in the target
header set.
The Copy Header from Inbound Request option and the Copy Header from
Outbound Response options specifies that at run time, the transport headers
action copies the specific header with which this option is associated from the
inbound message to the outbound message or vice versa.
•
SOAP Faults
•
•
In case an external service returns a SOAP fault, the Oracle Service Bus run time
sets up the context variable $fault with a custom error code and description with
the details of the fault.
<SOAP-ENV:Envelope xmlns:SOAPENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>Application Error</faultstring>
<detail>
<message>That’s an Error!</message>
<errorcode>1006</errorcode>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Working with Projects, Folders, and
Resources
•
•
•
•
•
•
•
•
•
•
•
Adding Projects
Renaming Projects
Moving Projects (Converting to a Folder)
Cloning Projects
Deleting Projects
Adding Folders
Renaming Folders
Moving or Upgrading Folders
Cloning Folders
Deleting Folders
Creating Resources
Resources
•
•
•
•
•
•
•
•
•
•
•
•
•
Proxy Service
Business Service
Split-Join
WSDL
XML Schema
WS-Policy
XQuery Transformation
XSL Transformation
MFL File
Service Account
Service Key Provider
JAR
XML Document
•
•
•
•
•
•
•
Loading Resources from a URL
Renaming Resources
Moving Resources
Cloning Resources
Exporting a WSDL
Generating a WSDL
Deleting Resources
WSDL support
•
•
•
•
Adding WSDLs
Editing WSDLs
Deleting WSDLs
Resolving Unresolved WSDL References
•
Refer section 6.6 of Administrators guide
Schema Support
•
•
•
•
•
Locating XML Schemas
Adding XML Schemas
Editing XML Schemas
Deleting XML Schemas
Viewing Unresolved XML Schema References
XQuery Support
•
•
•
•
Locating XQuery Transformations
Adding XQuery Transformations
Editing XQuery Transformations
Deleting an XQuery Transformation