Professional Documents
Culture Documents
Implementing Aia Service Bus 11g 362707
Implementing Aia Service Bus 11g 362707
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Disclaimer
The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracles products remains at the sole discretion of Oracle.
-2-
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Table of Contents
Table of Contents ........................................................................................................ 3 Preface........................................................................................................................ 8
Goal of this Document ............................................................................................................ 8 Pre-requisites .......................................................................................................................... 8 Oracle OSB and Oracle AIA Documentation .......................................................................... 8 Additional Resources .............................................................................................................. 9
Part I: Designing AIA Services Using OSB. .............................................................. 10 Chapter 1: Introducing OSB and AIA ......................................................................... 11
Oracle Service Bus (OSB) .................................................................................................... 11 Applications Integration Architecture (AIA) ........................................................................... 12 AIA Service Artifacts ......................................................................................................... 13 Enterprise Business Services (EBS) ............................................................................ 14 Enterprise Business Flow (EBF) .................................................................................. 15 Application Business Connector Services (ABCS) ...................................................... 17
-3-
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Part II: Building AIA Services Using OSB .................................................................. 31 Chapter 6: Building AIA Artifacts using OSB Preparatory Steps ............................. 32
Getting AIA Components from FP Install .............................................................................. 32 Registering AIA Components with OSB ............................................................................... 32 Registering AIA Components as a jar File ....................................................................... 33 Working with AIA Configuration File ..................................................................................... 33
-4-
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Configuring Service Callout Action ................................................................................... 52 Invocation of EBS and / or Application Services .......................................................... 52 Computing Dynamic Endpoint Location in ABCS ........................................................ 53 CAVS Enabling ............................................................................................................ 54 Logging ............................................................................................................................. 54 Error Handling in ABCS .................................................................................................... 54
-5-
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Chapter 19: OSB Service Configuration .................................................................. 106 Appendix ................................................................................................................. 109
-6-
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Uploading AIA Components as a Zipped File ..................................................................... 109 Updating the WSDL from Enterprise Services Library for Creating OSB Service .............. 110 Updating WSDL .............................................................................................................. 111 Creating SB Configuration Jar File for AIA Components ............................................... 111 Constructing a OSB Business Service ........................................................................... 111 Creating JMS Resources ................................................................................................ 112 How to Create a New JMS Server ............................................................................. 112 How to Create a JMS Module for the JMS Server ..................................................... 112 How to Add Resources to the JMS System Module .................................................. 112 Parameters for Guaranteed delivery .......................................................................... 113
-7-
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Preface
Oracle Service Bus (OSB), formerly known as Aqualogic Service Bus is a lightweight Enterprise Service Bus targeted for SOA-based integration. It is policy-driven and enables loose coupling between service clients (the service consumers) and business services (the service providers). OSB provides a configuration-based approach for developing SOA assets and deploying SOA services. It delivers message-processing capabilities such as message validation, message enrichment and message transformation. It also provides support for message routing capabilities and support for multiple service-invocations.
Pre-requisites
The reader is expected to have a good understanding of OSB as well as AIA architectural principles. For detailed information about AIA principles, see Oracle Fusion Middleware Concepts and Technologies Guide for Oracle Application Integration Architecture Foundation Pack. For more information about OSB, see Oracle Fusion Middleware Concepts and Architecture for Oracle Service Bus.
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Oracle Fusion Middleware Migration Guide for Oracle Application Integration Architecture Foundation Pack Oracle Fusion Middleware Concepts and Technologies Guide for Oracle Application Integration Architecture Foundation Pack Oracle Fusion Middleware Developers Guide for Oracle Application Integration Architecture Foundation Pack Oracle Fusion Middleware Infrastructure Components and Utilities Users Guide for Oracle Application Integration Architecture Foundation Pack Oracle Fusion Middleware Enterprise Business Object Designer Users Guide for Oracle Application Integration Architecture Foundation Pack Oracle Fusion Middleware Reference Process Models Users Guide for Oracle Application Integration Architecture Foundation Pack
Additional Resources
The following resources are also available: Resource Oracle Application Integration Architecture: Product-toGuide Index Known Issues and Workarounds Release Notes Documentation updates Location My Oracle Support: https://support.oracle.com/ My Oracle Support: https://support.oracle.com/ Oracle Technology Network: http://www.oracle.com/technology/ My Oracle Support: https://support.oracle.com/
-9-
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 10 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Built to meet exacting standards for reliability, availability, scalability, and performance, Oracle Service Bus uniquely combines the integration capabilities of an Enterprise Service Bus with operational service management, into a single enterprise-class software product, with a layered functional architecture. Oracle Service Bus provides message delivery services, based on standards including SOAP, HTTP and Java Messaging Service (JMS). It is typically designed for high-throughput, guaranteed message delivery to a variety of service producers and consumers. It supports XML as a native data format, while offering alternatives for handling other data formats.
- 11 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Oracle Service Bus is policy driven and enables you to establish loose coupling between service clients and business services, while maintaining a centralized point of security control and monitoring. It stores persistent policy, proxy service, and related resource configurations in metadata, that can be customized and propagated from development through staging to production environments required. The message-brokering engine accesses this configuration information from its metadata cache. Oracle Service Bus is an intermediary that processes incoming service request messages, determines routing logic, and transforms these messages for compatibility with other service consumers. It receives messages through a transport protocol such as HTTP(S), JMS, File, and FTP, and sends messages through the same or a different transport protocol. Service response messages follow the inverse path. The message processing by Oracle Service Bus is driven by metadata, specified in the message flow definition of a proxy service. For more information about OSB architecture, refer to Oracle Fusion Middleware Concepts and Architecture for Oracle Service Bus.
- 12 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 13 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 14 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Oracle Service Bus as well as Oracle Mediator technologies can be used to implement EBS. Note that Oracle Service Bus does not have the same capabilities as that of Oracle Mediator with respect to processing of messages in an ordered manner even if they arrive in an unordered manner. In situations where the ordered processing of messages does matter, refer to Oracle Fusion Middleware Developers Guide for Oracle SOA Suite and Oracle Fusion Middleware Developers Guide for Oracle Service Bus for information about choosing the right technology. To build Enterprise Business Services using OSB, refer to the chapters in Part II: Building AIA Services Using OSB. For complete details about developing EBS using Oracle Mediator, see Oracle Fusion Middleware Developers Guide for Oracle Application Integration Architecture Foundation Pack.
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
In a canonical integration, the EBF is an implementation of an enterprise business service (EBS) operation and calls other EBS. It will never call an application business connector service (ABCS) or the applications directly. In other integration styles, the caller invoking the EBF can either be an application or any other service. EBF can be implemented using BPM / BPEL technologies. The following diagram illustrates how various types of activities are strung together to implement a Business Process Service.
The following diagram illustrates a business process calling multiple activities. This diagram shows a business process implemented to leverage existing capabilities exposed as Enterprise Business Service operations.
- 16 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
BPEL, as well as OSB technologies, can be used to build ABCS. If the ABCS needs to manage the state in the integration layer or to implement an asynchronous request-response message exchange pattern, then you should leverage BPEL technologies.
- 17 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
To build ABCS using OSB, refer to the chapters in Part II: Building AIA Services Using OSB. To build ABCS using BPEL, refer to Oracle Fusion Middleware Developers Guide for Oracle Application Integration Architecture Foundation Pack.
The remaining chapters in Part I discuss the various AIA related use cases that warrant the use of OSB.
- 18 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 19 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Synchronous Request-Response
Many use cases warrant consumers to send requests synchronously to service providers and get immediate responses to each of their requests. These use cases need the consumers to wait until the responses are received before proceeding to their next tasks.
Use Case
For example, Customer Relationship Management (CRM) applications may provide features such as allowing customer service representatives to send requests to providers for performing tasks such as account balance retrieval, credit check, ATP (advanced time to promise) calculation, and so on. Since CRM applications expect the responses to be used in the subsequent tasks, this precludes the users from performing other tasks until the responses are received.
Points to Consider
AIA recommends using the synchronous request-response service interface for all the composites involved in processing or connecting the back-end systems. There should not be any singleton service in the services involved in the query processing. The general recommendation is for all of the intermediary services and the service exposed by the provider application to implement a request-response based interface - a two-way operation. Even though it is technically possible to design all services but the initial caller to implement two one-way requests, this implementation technique should be avoided if possible.
- 20 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Implementation should strive to ensure that no persistence of state information (dehydration) or audit details is done by any of the intermediary services or by the ultimate service provider. These techniques help keep the latency as low as possible. AIA also recommends that the intermediary services are co-located to eliminate the overheads normally caused by marshalling and un-marshalling of SOAP documents. In the case of a (non-transactional) synchronous-request-response MEP, the requester ABCS, by default, is a proxy service using HTTP transport and the applications access Requester ABCS as a web service.
Fire-and-Forget
The requester application should be able to continue its processing after submitting a request regardless of whether the service providers needed to perform the tasks are immediately available or not. Besides that, the user initiating the request does not have a functional need to wait until the request is fully processed. The service requesters and service providers must have the capability to produce and consume messages at their own pace without directly depending upon each other to be present.
Use Case
For example, order capture applications should be able to keep taking orders regardless of whether the back end systems such as order fulfillment systems are available at that time. You do not want the order capturing capability to be stopped because of non-availability of any of the services or applications participating in the execution of order fulfillment process.
- 21 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Points to Consider
AIA recommends the fire-and-forget pattern using queuing technology with a database or file as a persistence store to decouple the participating application from the integration layer. The queue acts as a staging area allowing the requester applications to place the request messages. The request messages are subsequently forwarded to service providers on behalf of requester as and when the service providers are ready to process them. It is highly recommended that the enqueueing of the request message into the queue is within the same transaction initiated by the requester application to perform its work. This ensures that the request message is enqueued into the queue only when the participating applications transaction is successful. The request message is not enqueued in situations where the transaction is not successful. Care must be taken to ensure that the services residing between two consecutive milestones enlist themselves into a single global transaction. In other cases (transactional flows), since the requester ABCS is built as a proxy service with transport as local, it is exposed to the external world via its HTTP adapter proxy service. In the case of an asynchronous interaction with the requester ABCS, a JMS consumer adapter proxy service that uses JMS as transport is required.
- 22 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Introduction
AIA architecture provides a robust extensibility framework for you to extend an existing PIP. You can use OSB for building extensions for the flows when OSB is the right technology.
- 23 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Not long running orchestration processes Synchronous responses from downstream services or applications in case of flows involving federated queries No need to sequence messages in case of asynchronous communication Note that AIA Foundation Pack does not provide native support for the AIA artifacts built using OSB: Life cycle management of OSB services AIA Custom xpath functions Instance level monitoring AIA Xref and DVM functions If you are building new Connector Services that need to modify or access cross reference data you should refrain from using OSB. If you are willing to build the cross reference data access functions on their own alone should consider building these types of connector services using OSB.
Extending ABCS
An ABCS, regardless of whether it is requester- or provider-specific, has the ability to invoke custom code either two or four times during its execution. These serve as extensibility call-outs. The ABCS supporting a request-response pattern in either synchronous or asynchronous mode has four extensibility points. An ABCS supporting a fire-and-forget pattern has two extensibility points. You can develop custom implementations and have them hooked to these extensibility points. These custom developed services behave as an extension to the delivered ABCS. Each extension point allows one hook so only a single customer extension can be plugged in. Each ABCS is accompanied by a corresponding customer extension service. A request-response ABCS has four extensibility points, therefore, the ABCS extension service will have four service operations. For a fire-and-forget ABCS, the corresponding ABCS extension service will have two service operations If you have chosen OSB as the strategic ESB for your company and implemented several services on OSB, you can use OSB to implement the ABCS extension service to complement the PIP functionality. If the use case requires calling the extension service within the same transaction as the Application Business Connector Service, then the ABCS needs to call a Mediator Service which in turn calls OSB service using direct binding.
- 24 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 25 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Virtualization using OSB In situations where you have built end-to-end flows using OSB technologies, an additional OSB proxy service is created with inbound support for HTTP transport; and this proxy service communicates with the existing EBS using local transport. The following diagram illustrates how the virtualization layer is created by leveraging the OSB based shared services. Refer to Chapter 6: Building AIA Artifacts using OSB Preparatory Steps more information.
- 26 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 27 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Introduction
Many customers have significant investments in legacy and proprietary technologies that support critical applications functions and data access. These systems may host functions such as account inquiry, order status inquiry, new order creation and so on. There is enormous value in exposing these capabilities in a semantically consistent open manner to multiple clients and channels. These services are either hosted on legacy applications directly or created on legacy EAI middleware. In either case, this pattern can be used to access these services so that coarse grained business services implement business logic without the need to deal with low level application accessing details.
- 28 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 29 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 30 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 31 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 32 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
The following section lists out the high-level tasks needed to register AIA components using a jar file.
1. In the OSB console, click Create, click System Administration and then click Import. 2. Browse the file system and select the jar file to be imported into the OSB.
- 33 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
The AIA configuration file can be accessed using either xslt through custom xpath functions or in OSB pipeline through java callout. For xslt, refer to Using AIA XPath Functions and for java callout refer to Using Java Callout for Invoking AIA Configuration API in Computing Dynamic Endpoint Location in ABCS.
- 34 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Introduction
EBSs are the foundation blocks in Oracle Application Integration Architecture (AIA). An EBS represents the application- or implementation-independent Web service definition for performing a business task, and the architecture facilitates distributed processing using EBS. Since an EBS is self-contained, it can be used independently of any other services. In addition, it can be used within another EBS. For more information about EBS, see "Understanding Enterprise Business Services" in the Oracle Fusion Middleware Concepts and Technologies Guide for Oracle Application Integration Architecture Foundation Pack. You must construct an EBS when the business process integration is between multiple source applications and target applications using the canonical model. The purpose of the EBS is to: Provide the mediation between the requesting services and providing services. Provide different operations invoked from a requester Application Business Connector Service (ABCS), an EBS, or an Enterprise Business Flow (EBF). Route an operation to a suitable EBS, EBF, or provider ABCS based on the evaluation of the various routing rules for an operation.
- 35 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 36 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 37 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 38 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Message Routing
Routing Rules, specified for each operation defined on EBS services, are used to decide where the incoming request should be routed. The following sections capture the support and the ability provided in the OSB Proxy service for specifying routing rules, evaluating these rules, and determining what service to route to. The message flow of an OSB proxy service consists of a set of nodes. The Route node dispatches the message to another service. The routing behavior of the message flow is defined by the configuration of the Route node. Recommendations: Even though OSB does have multiple mechanisms to interact with external services, AIA recommends the use of the Route node in Enterprise Business Services to dispatch requests to target services.
- 39 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Proxy needs to be modified to change the routing end point. Because of these issues, AIA does NOT recommend the constructs Route-To and Routing Table to be used from an EBS. Dynamic Routing Dynamic Routing eliminates the need to modify the Proxy to change the routing endpoint. When you need to determine which of several services to invoke at runtime, use Dynamic Routing. AIA recommends this approach for configuring the routing from the EBS. Achieved in a route node, dynamic routing: Eliminates the need to hard code the routing rule expressions in the EBS configuration Ensures that the EBS does not need to be modified to change the routing endpoint Externalizes the binding between the EBS and target service (could be either proxy or business) out of EBS Allows XQuery expression to be defined in a separate XQuery resource to choose one of the several services To make the dynamic routing work, you need to have the following in place. 1. An XQuery resource, having an UDF a. b. c. d. To evaluate the routing rules filter expression for a specific operation on the EBS. Routing rules filter expression is specified as an XPath expression Decides where the incoming request should be routed to The UDF returns a complex XML node that provides fully qualified path to a Service and also the type of the service as shown below.
<dynamicservice> <servicename>[fully qualified path to a Service]</servicename> <operationname>[name of the operation being invoked] </operationname> <servicetype>[proxy/external]</servicetype> </dynamicservice> e. f. Every operation defined on EBS would have an XQuery resource specific to it. The XQuery resource for a given operation is dynamically determined at runtime.
For a specific operation, returns a fully qualified path to a matching XQuery resource as described the previous step.
The value of <servicetype> is either proxy or external depending on whether the EBS needs to route to a proxy or an external service (represented by a OSB Business Service).
- 40 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
The dynamic route is achieved by computing the value of pre-defined OSB context variable ctx: route, by using the values of elements <servicename> and <servicetype>. This OSB context variable is used when adding the Dynamic Route node in the message flow. In summary: Use two XQuery resources XqueryResourceFinder and operation-specific XQuery resource that evaluate the routing rule expression. Construct the OSB context variable ctx:route. This variable defines the dynamic endpoint of the service where the message will be eventually routed. Use the ctx:route in the action Dynamic route to service of the Route node.
AIA recommends that Dynamic Routing be used in conjunction with the Operation Branch construct to model a routing from the EBS. To build routing logic for each operation: Select a service operation Add route node in the message flow for the selected operation Model the dynamic route as described in the previous section
- 41 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
A sample EBS configured with Operational Branch that uses a Dynamic Query is given here.
Error Handling
See Chapter 18: Error Handling in OSB
Logging
See Chapter 17: Logging Messages in OSB
- 42 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 43 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
The ABCS enables participating applications to become service providers as well as service consumers. It also enables applications having nonstandard connectivity to expose their functionality as web services. For more information about ABCS, see "Understanding Application Business Connector Services" in the Oracle Fusion Middleware Concepts and Technologies Guide for Oracle Application Integration Architecture Foundation Pack.
Designing ABCS
This section includes the following topics: Key Tasks Defining the ABCS Contract Defining the Role of the ABCS
Key Tasks
An ABCS architect or developer must perform the following tasks as part of the design activity:
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Identify the business events triggering the invocation of ABCS Identify the interactions between application and the ABCS and vice versa Identify the appropriate technologies to be used to facilitate the interaction Define the ABCS contract
- 45 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
2. Determine what interaction pattern is needed. The following questions help the architect in identifying the optimal message exchange pattern. What business events will cause the invocation of requester ABCS? Is the application expecting a response from the requester ABCS? Does the application need to wait until the response is received for performing the next task? Does the application need to wait until the request is fully processed by the provider application?
For more information about choosing a MEP, see "Choosing the Appropriate MEP." in Oracle Fusion Middleware Developer's Guide for Oracle Application Integration Architecture Foundation Pack. 3. Determine what Enterprise Business Services or operations need to be invoked. 4. Does the message sent by the requester application have all the information necessary for requester ABCS to construct the EBM? a. b. If not, does it have to reach out to applications to get the additional information? If yes, what technologies are available? What application interfaces are to be used to get the additional information?
For more information, see Oracle Fusion Middleware Developer's Guide for Oracle Application Integration Architecture Foundation Pack 5. Can the application possibly publish a message with incomplete information? a. Should the ABCS wait until the message with complete information is published?
In such a scenario, an aggregator should collect and store individual messages until a complete set of related messages has been received b. If yes, what is the application service and how does it communicate with it?
- 46 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
1.
Decide whether the application can directly consume the information sent by EBS.
2. Determine how the ABCS interacts with provider applications. 3. Define the tasks that must be done by this ABCS. 4. Determine what message exchange pattern (MEP) is used to communicate with the application. 5. Determine whether data validation must be done on the EBM sent by the EBS prior to sending the request to the provider application. 6. Decide whether you need guaranteed delivery of messages. 7. Determine whether it is a single message containing data for multiple instances. 8. Decide whether the entire message should be processed as a single unit of work.
Developing ABCS
Note: OSB technology is recommended only for building the ABCS that is stateless. Implementation Technology: The ABCS should be built as a proxy service Service Type : web service Transport Protocol: AIA recommendation is to use local as transport in those cases where transaction propagation is required. Transaction is propagated in proxy service only when the transport is local When HTTP transport is used for proxy service, the transaction cannot be propagated even though the calling service is local and has a transaction
For remotely accessing the ABCS, an HTTP adapter proxy for the ABCS need be developed. AIA recommends that HTTP adapter needs to be built for the ABCS. In case of (non-transactional) synchronous-request-response MEP, AIA recommends that ABCS should be a proxy service using HTTP transport. EndPoint URI - The end point URI is the URI used by the client for accessing the service. Hence, in this sample, provide the service name as the endpoint URI. EndPoint URI configuration is required only for non-local transports. In such cases, the service name is generally recommended as the end point URI. For the creation of an ABCS as an OSB proxy service with web service as Service Type refer to Chapter 14: Implementing Synchronous Request-Response MEP. The following sections describe the programming model for implementing the core tasks of an ABCS, including: Message validation Message transformation
- 47 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Message enrichment Invocation of EBS Synchronous interaction with applications/services Executing JAVA code Enabling CAVS
Message Validation
OSB provides the capability for incoming or outgoing messages to be validated against a WSDL or XML schema with a validation action. Messages that fail validation can log the failure or create an error in cases where an error stage can be used to apply alternative actions. Every ABCS needs to have the validation action. By default, it should be turned off and at run time, it should turn on the validation on request basis.
Message Transformation
OSB adds a message transformation layer that is useful for: Mapping disparate data between source and destination Manipulating the contents of the message OSB provides support for the message transformation using two different technology standards XSLT and XQuery. XSLT XSL maps describe XML-to-XML mappings. These transformations (XSLs) can be created by a developer and imported into OSB or the existing XSL resources can be imported into OSB. The messages content can be manipulated by applying XSLT in conjunction with the message processing actions assign, replace, insert, and so on using the XPath Expression Editor of the OSB console. Note: It may be necessary to add definitions for the user-defined namespaces into the OSB for the namespace prefixes used in the XPath expressions. The figure below shows a sample XPath expression and the user defined prefixes.
- 48 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
The following sample shows a Replace action in the proxy message flow to apply an XSL transformation on a messages content. Replace [ entire node ] of [ ./ cmu:ListOfCmuAccsyncAccountIo] in [ body ] with [ Xslt Resource: XformListOfCmuAccsyncAccountIoToQueryCustomerPartyEBM] Input Document: $body
Transformation can be applied to any node in the inbound message. The inbound message is available in the Request Pipeline as a pre-populated variable, body. While applying transformation to a message contents (node), it is possible to either replace the entire node with the reformatted message or just to replace the contents of the node. AIA recommends that the Replace node contents option is used while configuring the stage for applying the transformation. Transformations can be used in the message-flow configuration of the proxy service before the message is sent to the destination service, and also the reverse transformation can be applied to the services response. In the former case, for example, to convert an ABM into an EBM, the XSLT is in the Request Pipeline applied with the help of the message processing actions. In the case of reverse transformation, to convert from EBM to ABM, the XSLT can be applied to the response message by adding the message processing actions as the Response Actions of the Route node. XQuery Maps can describe XML-to-XML, XML to non-XML, and non-XML to XML mappings. The message transformation using XQuery is addressed in this document: http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15867/xquery_transforms.htm#OSBA G926.
- 49 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Message Enrichment
In situations where an ABCS has to query the participating application to get the information and enrich the message before submitting to EBS, Service Callout action is used in a Pipeline pair to call the services. It should be noted that the Service Callout action is used only for invoking synchronous request-response operations. OSBs Service Callout action offers greater flexibility for more sophisticated message flows. The service callout action is used inside a message flow to call on another service registered within OSB to perform necessary action on the message. The response returned by that service is assigned to a local variable. The variable can then be used within the current message flow. The Service Callout action can be used configure a synchronous (blocking) callout to an OSBregistered proxy or business service. The service types that can be called could be web service, SOAP, any XML Service and Messaging.
In other cases (transactional flows), since the requester ABCS is built as a proxy service with transport as local, it is exposed to the external world via its HTTP adapter proxy service. For asynchronous interaction with the requester ABCS, a JMS consumer adapter proxy service that uses JMS as transport is required.
- 50 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
For asynchronous interactions using JMS, see Chapter 10: Asynchronous Invocation of ABCS.
- 51 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 52 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
2. Configure a stage, naming it GetCAVSEndpointLocation a. b. Use a flow-control action if-then- to check if the value of the property is set to true If the property value is true, then use java callout as in 1.(a) to read the value of the property Routing.[PartnerlinkName].CAVS.EndpointURI
Developing Provider ABCS with Dynamic Endpoint To code a provider ABCS for dynamic CAVS-enabled endpoint for invoking target participating application web service: In the request pipeline of the provider ABCS proxy service, 1. Configure a stage, naming it GetTargetSystemID, a. b. Use the Replace action, apply XSLT, AddTargetSystemID.xsl, on the inbound EBM Use Assign to set the value of [names pace prefix of EBM]QueryCustomerPartyEBM/corecom:EBMHeader/ corecom:Target/ corecom:ID to variable SystemID
2. Configure a stage, naming it AssignDynamicPartnerlinkVariables, with Assign action to set the variables with ServiceName, endpoint name (PartnerLinkName), routeToCavs PropertyName, and cavsEndpoint PropertyName 3. Compute the targetEndpointLocation as described in Configuring Service Callout Action. 4. Add a Service callout action in the proxy and configure it:
- 53 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
a. b.
In the Request actions of the Route node, add a flow-control action if-then- to check if targetEndpointLocation has a value. If yes, add a Routing Options action to override the default configuration of the route node Set the checkbox URI and set its expression with targetEndpointLocation Set the Mode to request-response or request, depending on whether the MEP is request-response or request-only. For other configuration parameters, refer to Chapter 19: OSB Service Configuration
CAVS Enabling
Developing Provider ABC Services to be CAVS-Enabled To enable CAVS on a provider ABCS, follow the steps documented in Developing Provider ABCS with Dynamic Endpoint Developing Requester ABC Services to be CAVS-Enabled Some requester ABC services need to communicate directly back to the calling participating application. For this type of outbound interaction, the requester ABC service is acting like a provider ABC service because it is invoking a participating application web service. For this scenario, configuring the Requester ABCS is similar to configuring the Provider ABCS for CAVSenablement
Logging
See Chapter 17: Logging Messages in OSB
- 54 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 55 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
For more information, refer to sections Introduction to Enabling Requester ABCS for Extension and Introduction to Enabling Provider ABCS for Extension in Oracle Fusion Middleware Developers Guide for Oracle Application Integration Architecture Foundation Pack.
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
service at the extension point. A Business Service representing the service at the extension point must be defined with a dummy endpoint URI. The design-time URI is overridden with the runtime-URI, which is read from the configuration file, AIAConfigurationProperties.xml. ABCS uses a Service callout action to invoke the Business Service. The steps are detailed below.
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
7. Enter pre[process_stepname]ABMRespMsg as the Response Document Variable 8. In Request Actions of the Service callout, use the Java Callout action to read the concrete end point URL of the service at the extension point. 9. In Request Actions of the Service callout, add the action Routing Options 10. Override the URI in the Routing Options with the concrete end point URL of the service 11. Add a Replace action after the Service Callout action and replace the payload of the variable body with the value of the variable Enter pre[process_stepname]ABMRespMsg
- 58 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Introduction
This chapter describes how OSB can be configured to provide an asynchronous messaging pattern on a synchronous ABCS implementation. The ABCS is a Proxy Service with transport protocol as local. JMS is used as the underlying infrastructure. The inbound service request messages are queued in a JMS queue and then dispatched to the synchronous ABCS implementation.
The steps required to implement this solution are described below. The prerequisite is to configure the JMS Connection Factory and the JMS Queue, which are used in the configuration of JMS Consumer Adapter, an OSB proxy service. See the Appendix for details. The following sections describe two OSB Services required for Asynchronous MEP using JMS: JMS Consumer Adapter proxy service to consume messages off the queue JMS Producer Adapter to feed the queue
- 59 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 60 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
For more details, refer to Oracle Fusion Middleware Concepts and Technologies Guide for Oracle Application Integration Architecture Foundation Pack.
- 61 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Introduction
AIA recommends using adapters when the applications that are integrated do not have support for web services and standard protocols. As current web service implementations do not have support for transactions, AIA also recommends using adapters when the integration with applications requires transactions.
For outbound communication using adapters, ABCS calls the OSB business service defined using JCA transport. If you need additional transformation between ABCS and the back-end application, AIA recommends creating a proxy service with local transport along with a business service. For inbound communication using adapters, AIA recommends creating an adapter proxy service with JCA transport. The Adapter proxy service calls the ABCS. The Adapter proxy service may have additional transformation if required.
- 62 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
4. From the WLS console, create a datasource with the same name you used in configuring the adapter in JDeveloper. 5. From the WLS console, optionally configure the datasource on the adapter you are using in deployments with the datasource name. 6. From the OSB console, create resources for WSDL and schema files 7. Create a business service(outbound communication) or proxy service(inbound communication) with JCA transport and use the xml file For detailed instructions on how to configure each adapter refer to Oracle Fusion Middleware Developers Guide for Oracle Service Bus.
- 63 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Introduction
AIA recommends using best-of-breed technologies to implement AIA integrations. There may be some uses which warrant the OSB- based AIA services to interoperate with AIA services implemented using other technologies such as BPEL and Mediator. The following methods can be used to facilitate the interoperability with SCA-based technologies: Web services Queues SOA Direct transport AIA recommends using SOA direct transport because it is transactional and high performant due to runtime optimization.
- 64 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
2. Create a business service with SOA-direct transport. Note: It is assumed that WSDLs and schemas are already registered as OSB resources. To create a business service: 1. Create a new resource, of type Business Service, in the project folder. 2. Select the service type web service. 3. Click Browse and select customerPartyEBS.wsdl from the displayed list of registered WSDLs. 4. From the pop-up, Select a WSDL Definition, select the binding CustomerPartyEBSBinding
- 65 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Transport Configuration
Protocol - Use SOA-direct transport for business service. EndPoint URI - The end point URI is the URI which is used to access the service. When using SOA-direct transport, refer to the following link for URI format:
http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15866/soa.htm#BABJAEFJ
The summary page of the business service, after the configuration is complete, is shown below.
- 66 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 67 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Transport Configuration
Protocol - Use sb transport for sb adapter proxy service EndPoint URI - The end point URI is the URI used by the client for accessing the service. When using sb transport, the service would not have <service name>. Please refer to the following url for complete details http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15866/sb.htm#i1103399 The following screenshot shows the summary page of the proxy service, after the configuration is complete.
- 68 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
2. Drag and drop direct binding on to reference lane. 3. Make the following changes: a. b. c. d. Reference Target : Oracle Service Bus WSDL URL : Point to abstract WSDL in the mds Address : sb:/<proxy name given for sb adapter proxy service> Provider URL : t3://<host:port>
- 69 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
3. Click Add to see the list of the policies and select the policy.
4. Click Submit.
- 70 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
5. Click Update.
- 71 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Introduction
You may have use cases where you need to send requests synchronously to service providers and get immediate responses to each of the requests. These use cases require that you wait until the responses are received before proceeding to the next tasks. For example, Customer Relationship Management (CRM) applications may provide features such as allowing customer service representatives and systems to send requests to providers for performing tasks such as account balance retrieval, credit check, ATP (advanced time to promise) calculation, and so on. Since CRM applications expect the responses to be used in the subsequent tasks, this precludes the users from performing other tasks until the responses are received.
- 72 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Create a new project, SamplesCustomerPartyEBS. Create a new resource, of type Proxy Service, in the project folder. Name it SamplesCustomerPartyEBS. Select the Service Type as WSDL Web Service. Click Browse and select customerPartyEBS.wsdl, from the displayed list of registered WSDLs. From the pop-up, Select a WSDL Definition, select the binding CustomerPartyEBSBinding.
Transport Configuration
Protocol - Use local transport for EBS proxy service by default. Hence, for this sample, the protocol selected for the SampleCustomerPartyEBS is local. EndPoint URI - The end point URI is the URI used by the client for accessing the service. When using local transport, the service does not have an endpoint. In this sample, the EBS would not have any endpoint URI. Configure the end point URI only for non-local transports. The format of the URI is based on the transport protocol. This page shows the summary page of the EBS proxy service, after the configuration is complete.
- 73 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 74 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
EvaluateRoutingRule This XQuery resource evaluates the xpath filter expressions for a specific operation, SamplesQueryCustomerParty, on EBS. It returns one of the available target services as a complex xml element. The function is named EvaluateRoutingRule and takes QueryCustomerPartyEBM as the parameter. The function tries to evaluate the filter expressions to a logical truth-value and if successful, returns the corresponding complex XML element. The steps involved in message flow configuration are defined below: 1. Create XQuery resources XqueryResourceFinder and EvaluateRoutingRule and upload into OSB a. b. c. In the OSB console, navigate to folder SamplesCustomerPartyEBS from the Project Explorer. To create a new resource, select Resource Type XQuery. Click Browse and upload the existing XQuery file in the file system, OR enter the XQuery text and click Save.
2.
3. Add the Assign action in the stage: a. b. For Assign Expression, click XQuery Resources and choose XqueryResourceFinder as the resource. Assign the result of this expression to the variable dynamicXQueryResource.
4. Add the Assign action in the stage: a. b. c. d. For Assign Expression, click Dynamic XQuery and choose EvaluateRoutingRule as the resource. To add a custom variable, click Add and provide QueryCustomerPartyEBMVar as the Variable name. Enter $body/* as the binding input value to the variable QueryCustomerPartyEBMVar. Assign the result of this expression to the variable endPointService.
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
a. b.
For the Assign expression, click XQuery Text. Use the value of the variable endPointService and prepare the context variable, ctx: route as shown below
let $servicedetails:=$endPointService return if($servicedetails/servicetype/text()=proxy) then <ctx:route> <ctx:service isProxy=true>{$servicedetails/servicename} <ctx:operation>{$servicedetails/operationname}</ctx:operation> </ctx:service> </ctx:route> else <ctx:route> <ctx:service isProxy=false>{$servicedetails/servicename} </ctx:service> </ctx:route>
c.
6. Add Dynamic Route Node in the message flow a. b. Create a RouteNode, and add action Dynamic route to service Edit the expression and enter $dynamicEndpoint as the value
- 76 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
a. b.
Click Project Explorer on the left panel in the OSB console. Enter the project name in the text box as SamplesQueryCustomerPartySiebelReqABCSImpl and click Add Project.
2. Upload the WSDL SamplesQueryCustomerPartySiebelReqABCSImpl.wsdl a. b. c. d. In the projects table, click the project that has been just created. From Select Resource type drop down options, select WSDL Click Browse and navigate to the path in the file system to find SamplesQueryCustomerPartySiebelReqABCSImpl.wsdl. Click Save. The OSB console displays the following conflict message:
e.
In order to resolve the conflicts, you need to upload all the files that are referenced by SamplesQueryCustomerPartySiebelReqABCSImpl.wsdl. The following files have to be uploaded into the OSB from the file system by following the procedure defined by steps 2(a) through 2(c). Runtimefault.wsdl, CmuAccsyncAccountIo.xsd
Note: Do not upload Meta.xsd as it is already bundled in EOL. Upload CmuAccsyncAccountIo.xsd into the folder SamplesQueryCustomerPartySiebelReqABCSImpl.
f.
To resolve the conflicts, go back to project folder and drill down into WSDL SamplesQueryCustomerPartySiebelReqABCSImpl.wsdl. Go into the Edit References screen.
For each resource type, WSDL and XSD, click Browse and select an appropriate resource from the browser list shown by OSB Console. Save the WSDL after resolving all the conflicts.
- 77 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
3. Update the WSDL SamplesQueryCustomerPartySiebelReqABCSImpl.wsdl, fixing the missing port/ binding information in the WSDL. a. Insert the following xml element in the wsdl.
<binding name="SamplesQueryCustomerPartySiebelReqABCSImplBinding" type="tns:SamplesQueryCustomerPartySiebelReqABCSImpl"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="SamplesQueryCustomerParty"> <soap:operation style="document" soapAction="SamplesQueryCustomerParty"/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> </binding> 4. Create the Proxy Service SamplesQueryCustomerPartySiebelReqABCSImpl in the project folder a. b. c. d. e. f. g. Create a new resource, of type Proxy Service, in the project folder. Name it SamplesQueryCustomerPartySiebelReqABCSImpl. Select the Service Type Web Service. Click Browse and select SamplesQueryCustomerPartySiebelReqABCSImpl.wsdl, from the displayed list of registered wsdl s. From the pop-up, Select a WSDL Definition, select the binding SamplesQueryCustomerPartySiebelReqABCSImplBinding Protocol select http from the drop down. EndPoint URI - The end point URI is the URI used by the client for accessing the service. In this sample, provide the service name as the endpoint URI.
The summary page of the proxy service, after the configuration is complete would look as shown below:
- 78 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
5. Upload the XSLs required for message transformations in the proxy a. Upload the following XSL resources into OSB b. XformListOfCmuAccsyncAccountIoToQueryCustomerPartyEBM.xsl XformListOfCmuAccsyncAccountIoToQueryCustomerPartyEBM_Custom.xsl XformQueryCustomerPartyResponseEBMToListOfCmuAccsyncAccountIo.xsl
Make the following changes to the XSL resources: In the Node Selection xpath, / does not work because the root node is soap. Replace / with //. Comment out the API getEBMHeaderSenderSystemNode and all references to the node returned by the API. Hard code the BSR values assigned to EBM Header. Comment out Oracle xpath extensions such as orcl:generate-guid(). Comment out Xpath 2.0 functions such as xp20:current-dateTime(). Comment out the Xref and DVM functions.
For more details refer Using AIA XPath Functions. (The Appendix of this document contains the XSL s used by this POC)
- 79 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
b. c.
Add user defined namespace prefix variables and URI s for the node ListOfCmuAccsyncAccountIo. Select the XformListOfCmuAccsyncAccountIoToQueryCustomerPartyEBM.xsl as the XSLT Resource and enter $body as the Binding input.
2. Assign EBM Header a. b. Assign the expression $body/ebo:QueryCustomerPartyEBM/corecom:EBMHeader to the variable EBM_HEADER. Add user defined namespace prefix ebo with its URI, if required.
3. Route to the EBS from a Requester ABCS a. b. Add Route Node to the message flow. Edit the Route Node to invoke the SamplesCustomerPartyEBS proxy service invoking the operation QueryCustomerParty.
4. Transform the response EBM back to ABM a. b. c. d. Add actions to Response action of the Route Node to XFORM EBM to ABM To transform from EBM to ABM, add the Replace action to the response actions of the Route node. Replace the node QueryCustomerPartyResponseEBM in the variable body with the expression, which takes the form of XSLT resource. Select XformQueryCustomerPartyResponseEBMToListOfCmuAccsyncAccountIo.xsl as the XSLT resource and enter $body as the binding input.
- 80 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
a.
Use the Replace action to replace the node QueryCustomerPartyEBM in the variable body with the expression, which takes the form of XSL resource, AddTargetSystemID.xsl. Enter $body as the binding input.
b.
Assign the result of the XPath expression, $body/ebo:QueryCustomerPartyEBM/corecom:EBMHeader/corecom:Target/corecom:ID to the variable SystemID
Note: The name space prefixes used in the expression and the corresponding URI must be defined. 2. Assign EBM Header a. b. Assign the expression $body/ebo:QueryCustomerPartyEBM/corecom:EBMHeader to the variable EBM_HEADER Add user defined namespace prefix ebo with its URI, if required.
3. Add stage XformQueryCustomerPartyEBMToPcmOpCustCommitCustomer a. Use the Replace action to replace the node QueryCustomerPartyEBM in the variable body with the expression, which takes the form of xslt resource, XformQueryCustomerPartyEBMToPcmOpCustCommitCustomer. Select the XformQueryCustomerPartyEBMToPcmOpCustCommitCustomer.xsl as the XSLT Resource and enter $body as the binding input.
b.
4. To compute the dynamic endpoint location, and route to it, follow the steps 2,3, and 4 of Developing Provider ABCS with Dynamic Endpoint a. b. Default design-time Routing to the Provider service from a Provider ABCS. Add a Service call out action to invoke the SamplesCustomerPartyProvider service invoking the operation QueryCustomerParty.
5. Error Handling a. b. In the response actions, check for the Fault element in the response actions of the Route node. If the Fault element is present, raise an error with business error code and the business error message.
6. Transform the response from provider service back to EBM a. b. c. d. Add actions to Response action of the Route Node. Add the Replace action to the response actions of the Route node. Replace the node portalabm:PCM_OP_CUST_COMMIT_CUSTOMER_inputFlist in the variable body with the expression, which takes the form of xslt resource. Select the PcmOpCustCommitCustomerToQueryCustomerPartyResponseEBM.xsl as the XSLT resource and enter $body as the binding input
- 81 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 82 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
</xpf:xpathFunctions> 3. Click the expression on any of the message manipulation actions such as Assign.
4. Click XQuery Functions on left and identify the function by scrolling through the Functions window.
5. Drag and drop the function into XQuery/XSLT Expression Editor and change values for parameters.
- 83 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 84 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Introduction
The requester application should be able to continue its processing after submitting a request regardless of whether the service providers needed to perform the tasks are immediately available or not. Besides that, the user initiating the request does not have a functional need to wait until the request is fully processed. The service requesters and service providers must have the capability to produce and consume messages at their own pace without directly depending upon each other to be present. Composite business processes should be able to support the infrastructure services like error handling and business activity monitoring services in a decoupled fashion without depending on the participating application or the AIA functional process flows. For example, order capture applications should be able to keep taking orders regardless of whether the back end systems such as order fulfillment systems are available at that time. You do not want the order capturing capability to be stopped because of non-availability of any of the services or applications participating in the execution of order fulfillment process.
- 85 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
2. Upload the WSDL SamplesCreateCustomerSiebelReqABCSImpl.wsdl a. b. c. d. In the projects table, click the project that has just been created. From Select Resource Type options, select WSDL. Click Browse and navigate to the path in the file system to find SamplesCreateCustomerSiebelReqABCSImpl.wsdl. Click Save. To resolve the conflicts, upload all the files that are referenced by SamplesCreateCustomerSiebelReqABCSImpl.wsdl. Runtimefault.wsdl, CmuAccsyncAccountIo.xsd
Note: Do not upload Meta.xsd as it is already bundled in EOL. e. f. Upload CmuAccsyncAccountIo.xsd into the folder SamplesCreateCustomerSiebelReqABCSImpl. Go back to project folder, drill down into WSDL SamplesCreateCustomerPartySiebelReqABCSImpl.wsdl and go to the Edit References screen. For each resource type, WSDL and XSD, click Browse and select an appropriate resource from the browser list displayed by the OSB Console. Save the WSDL after resolving all the conflicts. 3. Update the WSDL SamplesCreateCustomerSiebelReqABCSImpl.wsdl, fixing the missing port/ binding information in the WSDL. Insert the following xml element in the wsdl: <binding name=" SamplesCreateCustomerSiebelReqABCSImplBinding" type="tns: SamplesCreateCustomerSiebelReqABCSImpl"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="CreateCustomer"> <soap:operation style="document" soapAction="CreateCustomer"/>
- 86 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
4. Create the Proxy Service SamplesCreateCustomerSiebelReqABCSImpl in the project folder a. b. c. d. e. f. g. Create a new resource, of type Proxy Service, in the project folder. Name it SamplesCreateCustomerSiebelReqABCSImpl. Select the Service Type as Web Service. Click Browse and select SamplesCreateCustomerSiebelReqABCSImpl.wsdl from the list of registered WSDLs. In the Select a WSDL Definition window, select the binding SamplesCreateCustomerSiebelReqABCSImplBinding. Protocol select http from the drop down EndPoint URI - The end point URI is the URI used by the client for accessing the service.Provide the service name as the endpoint URI.
5. Upload the XSLs required for message transformations in the proxy a. Upload the following XSL resources into OSB XformListOfCmuAccsyncAccountIoToCreateCustomerPartyListEBM.xsl XformListOfCmuAccsyncAccountIoToCreateCustomerPartyListEBM_Custom.xsl
6. Make the following changes to the XSL resources. a. In the node selection xpath, / does not work always because the root node is soap:Body. In the XPath expression, to select a node, / might be needed to be replaced with // whenever a node is to be searched in the document from the current node, no matter where it is. Comment out the API getEBMHeaderSenderSystemNode and all references to the node returned by the API. Hard code the BSR values assigned to EBM Header. Comment out Oracle xpath extensions such as orcl:generate-guid(). Comment out Xpath 2.0 functions such as xp20:current-dateTime(). Comment out the Xref and DVM functions.
b. c. d. e. f.
For more details refer to the section Using AIA XPath Functions (The Appendix of this document contains the XSL s used by this POC) Configure the Message Flow of the Proxy Service 1. Add stage XFORM ABM to EBM
- 87 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
a.
To transform from ABM to EBM, use the Replace action to replace the node ListOfCmuAccsyncAccountIo in the variable body with the expression, which takes the form of xslt resource. Use the expression. /cmu:ListOfCmuAccsyncAccountIo for the replace Add user defined namespace prefix variables and URI s for the node ListOfCmuAccsyncAccountIo. Select the XformListOfCmuAccsyncAccountIoToCreateCustomerPartyListEBM.xsl as the XSLT resource and enter $body as the binding input
b. c.
2. Assign EBM Header a. b. Assign the expression $body/ebo: CreateCustomerPartyListEBM/corecom:EBMHeader to the variable EBM_HEADER Add user defined namespace prefix ebo and its URI, if required.
3. Route to the EBS from a Requester ABCS a. b. Add Route Node in the message flow. Edit the Route Node to invoke the SamplesCustomerPartyEBS proxy service invoking the operation CreateCustomerParty
- 88 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
b.
Assign the result of the XPath expression, $body/ebo: CreateCustomerPartyListEBM/corecom:EBMHeader/corecom:Target/corecom:ID to the variable SystemID
Note: The name space prefixes used in the expression and the corresponding URI need to be defined. 2. Assigning EBM Header a. b. Assign the expression $body/ebo: CreateCustomerPartyListEBM/corecom:EBMHeader to the variable EBM_HEADER Add user defined namespace prefix ebo and with its URI, if required.
3. Add stage XformCreateCustomerPartyListEBMToPcmOpCustCommitCustomer a. use replace action to replace the node CreateCustomerPartyListEBM in the variable body with the expression, which takes the form of xslt resource, XformCreateCustomerPartyListEBMToPcmOpCustCommitCustomer
b. c. Select the XformCreateCustomerPartyListEBMToPcmOpCustCommitCustomer.xsl as the XSLT resource and provide the $body as the binding input
4. To compute the dynamic endpoint location, and route to it, follow the steps 2,3 & 4 of section Developing Provider ABCS with Dynamic Endpoint 5. Default design-time Routing to the Provider service from a Provider ABCS Add Service call out action to invoke the SamplesCreateCustomerPartyPortalProvider service invoking the operation CreateCustomerParty 6. Error Handling a. b. In the response actions, check for the Fault element in the response actions of the route node If Fault element is present raise an error with business error code and the business error message.
7. Transforming the response from provider service back to EBM a. b. c. d. Add actions to Response action of the Route Node add the replace action to the response actions of the Route node Replace the node portalabm:PCM_OP_CUST_COMMIT_CUSTOMER_inputFlist in the variable body with the expression, which takes the form of xslt resource. Select the XformPcmOpCustCommitCustomerToCreateCustomerPartyListResponseEBM.xsl as the XSLT resource and provide the $body as the binding input
- 89 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 90 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Introduction
When a service provider has to take a large amount of time to process a request, how can the requester receive the outcome without keeping the requester in a suspended mode during the entire processing? For example, the order capture application submits a request for fulfillment of an order. The order fulfillment process itself could take anywhere from several minutes to several days depending upon the complexity of tasks involved. Even though the order capture application would like to know the outcome of the fulfillment request, it cannot afford to wait idly until the process is completed to know the outcome. The following diagram depicts how an asynchronous request-delayed response is to be implemented.
As shown in the above diagram, the invocation track for sending the request to the provider application service is similar to what it is for the Fire-n-Forget MEP.
- 91 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
The Provider ABCS, after receiving the response from the Provider application, invokes a second one-way EBS. The invocation to the Response EBS is made using Route node. The Response EBS would then route response message to the Response ABCS. The URI of the response ABCS is computed dynamically from the EBM Header in the Response EBM. The sample illustrating this MEP has One-way Requester ABCS that routes the inbound request message to the Enterprise Business Service, CustomerPartyEBS. The EBS, CustomerPartyEBS that routes the inbound request message to the Provider ABCS. The Provider ABCS invokes the provider application using Service Call out action. The Provider ABCS uses Route node to route the response from the provider application to the CustomerPartyResponseEBS. CustomerPartyResponseEBS sends the response message to the Response ABCS. The process of dynamically routing to the Response ABCS is similar to how incoming request is routed from the CustomerPartyEBS to the Provider ABCS. The dynamic XQuery evaluates the routing rule checking the value of following node in the EBM header, to route to the Response ABCS ebo:CreateCustomerPartyListResponseEBM/corecom:EBMHeader/corecom:Sender/coreco m:WSAddress/wsa:ReplyTo/wsa:ServiceName
2. Upload the WSDL SamplesAsyncCreateCustomerSiebelReqABCSImpl.wsdl a. b. c. d. In the projects table, click the project that has been just created. From Select Resource type options, select WSDL. Click Browse and navigate to the path in the file system to find SamplesAsyncCreateCustomerSiebelReqABCSImpl.wsdl. Click Save In order to resolve the conflicts, upload all the files that are referenced by SamplesAsyncCreateCustomerSiebelReqABCSImpl.wsdl. Runtimefault.wsdl, CmuAccsyncAccountIo.xsd
- 92 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Note: Do not upload Meta.xsd as it is already bundled in EOL. e. f. Upload CmuAccsyncAccountIo.xsd into the folder SamplesAsyncCreateCustomerSiebelReqABCSImpl. Go back to project folder, drill down into the WSDL SamplesAsyncCreateCustomerPartySiebelReqABCSImpl.wsdl and go into the Edit References screen. For each resource type, WSDL and XSD, click Browse and select an appropriate resource from the browser list displayed by OSB Console. Save the WSDL after resolving all the conflicts.
g.
3. Update the WSDL SamplesAsyncCreateCustomerSiebelReqABCSImpl.wsdl, fixing the missing port/ binding information in the WSDL. a. Insert the following xml element in the wsdl.
<binding name=" SamplesAsyncCreateCustomerSiebelReqABCSImplBinding" type="tns: SamplesAsyncCreateCustomerSiebelReqABCSImpl"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="CreateCustomer"> <soap:operation style="document" soapAction="CreateCustomer"/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> </binding> 4. Create the Proxy Service SamplesAsyncCreateCustomerSiebelReqABCSImpl in the project folder a. b. c. d. e. f. g. Create a new resource, of type Proxy Service, in the project folder. Name it SamplesAsyncCreateCustomerSiebelReqABCSImpl. Select the Service Type as Web Service. Click Browse and select SamplesAsyncCreateCustomerSiebelReqABCSImpl.wsdl, from the displayed list of registered wsdl s. From the pop-up, select a WSDL Definition and select the binding SamplesAsyncCreateCustomerSiebelReqABCSImplBinding Protocol select http from the drop down EndPoint URI - The end point URI is the URI used by the client for accessing the service. In this sample, provide the service name as the endpoint URI.
5. Upload the XSLs required for message transformations in the proxy a. Upload the following XSL resources into OSB XformListOfCmuAccsyncAccountIoToCreateCustomerPartyListEBM.xsl
- 93 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
b.
XformListOfCmuAccsyncAccountIoToCreateCustomerPartyListEBM_Custom.xsl
Make the following changes to the XSL resources: In the node selection xpath, / does not work always as the root node is soap:Body. So in the XPath expression, to select a node, / might be needed to be replaced with // whenever a node is to be searched in the document from the current node, no matter where it is. Comment out the API getEBMHeaderSenderSystemNode and all references to the node returned by the API Hard code the BSR values assigned to EBM Header Comment out Oracle xpath extensionssuch as orcl:generate-guid() Comment out Xpath 2.0 functions such as xp20:current-dateTime() Comment out the Xref and DVM functions
For more details -Refer to the section Using AIA XPath Functions (The Appendix of this document contains the XSL s used by this POC)
b. c.
2. Assign EBM Header a. b. Assign the expression $body/ebo: CreateCustomerPartyListEBM/corecom:EBMHeader to the variable EBM_HEADER Add user-defined namespace prefix ebo and its URI, if required.
3. Route to the EBS from a Requester ABCS a. b. Add Route Node to EBS Edit the Route Node to invoke the SamplesCustomerPartyEBS proxy service invoking the operation CreateCustomerParty
- 94 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
b.
Note: The name space prefixes used in the expression and the corresponding URI must be defined. 2. Assign EBM Header a. b. Assign the expression $body/ebo: CreateCustomerPartyListEBM/corecom:EBMHeader to the variable EBM_HEADER Add user defined namespace prefix ebo and its URI, if required.
3. Add stage XformCreateCustomerPartyListEBMToPcmOpCustCommitCustomer a. Use the Replace action to replace the node CreateCustomerPartyListEBM in the variable body with the expression, which takes the form of xslt resource, XformCreateCustomerPartyListEBMToPcmOpCustCommitCustomer Select the XformCreateCustomerPartyListEBMToPcmOpCustCommitCustomer.xsl as the XSLT resource and enter $body as the binding input
b.
4. To compute the dynamic endpoint location, and route to it, follow the steps 2,3, and 4 of Developing Provider ABCS with Dynamic Endpoint. Default design-time Routing to the provider service from a Provider ABCS Add Service call out action to invoke the SamplesCreateCustomerPartyPortalProvider service invoking the operation CreateCustomerParty
- 95 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
5. Error Handling a. b. In the response actions, check for the Fault element in the response actions of the route node. If the Fault element is present, raise an error with business error code and the business error message.
6. Transform the response from provider service back to EBM Apply transformation using the XSL, XformPcmOpCustCommitCustomerToCreateCustomerPartyListResponseEBM.xsl. The transformation copies the EBM header from the request message to the response message. 7. Add a route node to the pipeline to route the response message to the CustomerPartyResponseEBM.
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
:MessageProcessingInstruction/corecom:EnvironmentCode/text())) and ($CreateCustomerPartyListResponseEBMVar/corecom:EBMHeader/corecom:Se nder/corecom:WSAddress/wsa:ReplyTo/wsa:ServiceName ='SamplesAsyncCreateCustomerSiebelRespABCSImpl' <dynamicservice> <servicename>SamplesAsyncCreateCustomerSiebelRespABCSImpl/SamplesAsy ncCreateCustomerSiebelRespABCSImpl</servicename> <operationname>CreateCustomerResponse</operationname> <servicetype>proxy</servicetype> </dynamicservice> else if($CreateCustomerPartyListResponseEBMVar /corecom:EBMHeader/corecom:MessageProcessingInstruction/corecom:Envi ronmentCode/text()='CAVS') then <dynamicservice> <servicename>Simulator/CAVSService</servicename> <operationname></operationname> <servicetype>external</servicetype> </dynamicservice> else <dynamicservice></dynamicservice> }; declare variable $ CreateCustomerPartyListResponseEBMVar as element(ebo: CreateCustomerPartyListResponseEBM) external; xf:EvaluateRR($CreateCustomerPartyListResponseEBMVar)
- 97 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
When developing a OSB service, always call the aia:isTraceLoggingEnabled() function first. If it returns a true result, then have the process call the aia:logTraceMessage() function. These log files are stored in the <aia.home>/logs/ directory. In addition to these custom XPath functions, a Java API is also available so that you can use it to log trace messages.
- 98 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Finer Finest
- 99 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
One of the function signatures is as follows: AIALogger. isTraceLoggingEnabled (String logLevel, String processName) . This function determines whether trace logging is enabled for the service or at the overall system level. Following are the parameter details: logLevel Possible values include: Severe Warning Info Config Fine Finer Finest
processName Name of the Oracle AIA service using this function. Another function signature is as follows: AIALogger. logTraceMessage (String level, Element ebmHeader, String message) . This function generates the actual trace log. Following are the parameter details: level Possible values include: Severe Warning Info Config Fine Finer Finest
- 100 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 101 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
The service invocation receives a SOAP fault. In OSB proxy services, services can be invoked using service callout, publish, and route actions. The error handlers behave differently based on which action is used. For service callouts, the error handlers are invoked irrespective of whether it is an invocation failure or the invocation receives a fault. If route is used to invoke a service, then the error handler is not invoked when the invocation receives a SOAP fault. So the implementation should inspect the message in the response actions of the route node to check if it received a SOAP fault and raise a business error. This results in invocation of error handler.
- 102 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
- 103 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
If none of these values are available, the default values are fetched from the AIAConfigurationProperties .xml file.
- 104 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Note: OSB invokes AIA error handler for single view of errors as well as they can be resubmitted. The link in the error notification will be broken because OSB does not have instance level monitoring.
- 105 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Dispatch Policy
blank by default
Request Encoding Response Encoding Authentication Header Authentication Token Type Message Content Handling Transaction Required Same Transaction for Response JMS Transport Configuration Destination Type
Used for security, but we will use OWSM gateway Used for security, but we will use OWSM gateway
no
Enabled Enabled
Queue
- 106 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Is Response Required
this will be the default. We might select this option for certain patterns It will be used only in exceptional cases It will be used only in exceptional cases It will be used only in exceptional cases It will be used only in exceptional cases
Response Correlation Pattern Response URI Response Connection Factory Response Message Type Request Encoding Response Encoding Client Response Timeout Dispatch Policy Is XA Required Operation Selection Configuration Enforce WS-I Compliance Selection Algorithm Leave as UnChecked SOAPAction Header Select as Checked Use default settings, UTF-8
Not required when service type is Web Service Specifies that operation mapping be done automatically from the WSDL associated with this proxy service.
Message Content Handling Content Streaming Leave as UnChecked When enabled, cannot use certain actions replace, insert etc; we might use this option in exceptional cases We will use this only in specific use cases
- 107 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Business Service Transport Configuration protocol Load balancing algorithm Endpoint uri Retry count Retry interval Retry application errors HTTP Transport Configuration HTTP request method Authentication post no This is used for SSL Used for security, but we will use owsm gateway Used for controlling number of threads for this service Used for content encoding like utf 8
Dispatch Policy
blank by default
- 108 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Appendix
This appendix contains the following sections: Uploading AIA Components as a Zipped File Updating the WSDL from Enterprise Services Library for Creating OSB Service Creating JMS Resources
- 109 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Updating the WSDL from Enterprise Services Library for Creating OSB Service
The WSDL files in the ESL are abstract. However, OSB requires that they also describe how to invoke the service. Hence WSDL files need to be updated by providing details of bindings before they can be used for creating OSB artifacts business service/proxy service. In OSB 11g, all operations in the wsdl need to be updated with binding before they can be used for creating services. Note: OSB can only create services from WSDLs that have binding or port. AIA recommends that bindings be added to the ESL. AIA recommends SOAP as the binding to be used.
- 110 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
Updating WSDL
Add the following details to the CustomerPartyEBS.wsdl. Note that as a sample, only one operation element, QueryCustomerParty, is added in this example. If an EBS provides more than one operation, then it is necessary to include one operation element corresponding to each EBS operation. <binding name="CustomerPartyEBSBinding" type="corecustomerpartyebs:CustomerPartyEBS"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="QueryCustomerParty"> <soap:operation style="document" soapAction="SamplesQueryCustomerParty"/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> </binding> Add the above binding section after all the PortTypes in the WSDL.
- 111 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
a. b.
Select the protocol as http for the service type that is being created. Enter the end-point URI format based on the transport protocol that is selected for the field protocol in the above step.
4. For the rest of the configuration, please refer to Chapter 19: OSB Service Configuration
- 112 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
5. In the next page, JMS Destination Properties, set the name to AIASamplesQueue and set the JNDI Name to the same value. 6. On the next page, create a New Subdeployment with the name AIASamplesQueue. 7. In the final step, set the AIAJMSServer as the target JMS Server.
- 113 -
Oracle White PaperGuide to Implementing Application Integration Architecture on Oracle Service Bus
White Paper :Guide to Implementing Application Integration Architecture on Oracle Service Bus March 2011 Author: AIA Architecture Team Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065 U.S.A. Worldwide Inquiries: Phone: +1.650.506.7000 Fax: +1.650.506.7200 oracle.com 0109 Copyright 2009, Oracle and/or its affiliates. All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our prior written permission. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
- 114 -