+ All Categories
Home > Documents > Adapter Tutorial - · PDF fileReference: 2005/04/26 Adapter Tutorial Tutorial 4 : Receiving...

Adapter Tutorial - · PDF fileReference: 2005/04/26 Adapter Tutorial Tutorial 4 : Receiving...

Date post: 15-Mar-2018
Category:
Upload: leliem
View: 227 times
Download: 5 times
Share this document with a friend
13
Reference: 2005/04/26 Adapter Tutorial Tutorial 4 : Receiving SAP IDOC through the Oracle AS Adapter The Oracle AS Adapter for SAP exposes the SAP IDOC events as a Service via WSDL with JCA binding. This tutorial describes how to receive a SAP DEBMAS IDOC within a BPEL process. The BPEL process is an asynchronous service that is triggered by the arrival of a SAP DEBMAS event. Tutorial 4 : Receiving SAP IDOC through the Oracle AS Adapter ................................................................................................................................ 1 Overview.................................................................................................................................. 1 Configuring the Oracle AS Adapter for SAP .......................................................................... 1 Configuring the BPEL process to receive the SAP IDOC....................................................... 7 Registering the SAP Adapter as an RFC Server ...................................................................... 9 Deployment and Testing of the BPEL process ...................................................................... 12 Overview The Oracle AS Adapter for SAP is part of the Oracle AS Adapter install. The Oracle AS Adapter for SAP can be deployed as both a webservice Servlet as well as JCA 1.5 Resource Adapter. The Adapter Framework is used for the bidirectional integration of the JCA 1.5 resource adapters with BPEL Process Manager. Adapter FW is based on open standards and acts as a pseudo JCA 1.5 container for deployment on top of J2EE JCA 1.0 containers. It manages the Life-cycle (start/stop/endpoint activiation/endpoint deactivation) as well as the message-inflow system contracts for receiving adapter events and forwarding it to the BPEL process. Configuring the Oracle AS Adapter for SAP The Oracle AS Application Explorer is used to configure the Oracle AS Adapter for SAP. WSDL files are created for both JCA Outbound (Request-Response service – BPEL invoke) and JCA Inbound (Event Notification – BPEL receive) Interactions and saved to a local directory. These WSDLs are exposed to the BPEL Designer via the WSIL servlet. The Jdeveloper based design-time wizard has a WSIF browser that is launched from the BPEL Partner Link activity to explore the WSDLs generated by the Oracle AS Adapter Application Explorer. 1. Open a command prompt and cd to adapters/application directory. Run iaexplorer.exe”.
Transcript

Reference: 2005/04/26

Adapter Tutorial

Tutorial 4 : Receiving SAP IDOC through the Oracle AS Adapter The Oracle AS Adapter for SAP exposes the SAP IDOC events as a Service via WSDL with JCA binding. This tutorial describes how to receive a SAP DEBMAS IDOC within a BPEL process. The BPEL process is an asynchronous service that is triggered by the arrival of a SAP DEBMAS event.

Tutorial 4 : Receiving SAP IDOC through the Oracle AS Adapter ................................................................................................................................ 1

Overview.................................................................................................................................. 1 Configuring the Oracle AS Adapter for SAP .......................................................................... 1 Configuring the BPEL process to receive the SAP IDOC....................................................... 7 Registering the SAP Adapter as an RFC Server...................................................................... 9 Deployment and Testing of the BPEL process ...................................................................... 12

Overview The Oracle AS Adapter for SAP is part of the Oracle AS Adapter install. The Oracle AS Adapter for SAP can be deployed as both a webservice Servlet as well as JCA 1.5 Resource Adapter. The Adapter Framework is used for the bidirectional integration of the JCA 1.5 resource adapters with BPEL Process Manager. Adapter FW is based on open standards and acts as a pseudo JCA 1.5 container for deployment on top of J2EE JCA 1.0 containers. It manages the Life-cycle (start/stop/endpoint activiation/endpoint deactivation) as well as the message-inflow system contracts for receiving adapter events and forwarding it to the BPEL process.

Configuring the Oracle AS Adapter for SAP The Oracle AS Application Explorer is used to configure the Oracle AS Adapter for SAP. WSDL files are created for both JCA Outbound (Request-Response service – BPEL invoke) and JCA Inbound (Event Notification – BPEL receive) Interactions and saved to a local directory. These WSDLs are exposed to the BPEL Designer via the WSIL servlet. The Jdeveloper based design-time wizard has a WSIF browser that is launched from the BPEL Partner Link activity to explore the WSDLs generated by the Oracle AS Adapter Application Explorer.

1. Open a command prompt and cd to adapters/application directory. Run “iaexplorer.exe”.

2. Create a JCA project and point it to the Adapters home directory as shown below.

3. Select the jca project and select “connect” [Right-click to show options]. Expand the Adapters and Event folders to show the list of available backend applications.

4. Expand the SAP folder under Events and this exposes “Channels” and “Ports” folder. The Channel represents an SAP connection for receiving SAP events. The SAP Adapter is registered as a RFC Server with the SAP System. Choose “New target” option and create a SAP connection. Right-click on the SAP connection instance and select “Connect” to connect to the SAP instance. The above operation dynamically browses the SAP BAPIs, RFCs and IDOCs. The below set of figures capture these steps.

5. Connect to SAP instance beasap46.ibi.com. Create a “Channel” component for listening to SAP events. The channel component is used for registering the SAP Adapter as a RFC server that can listen to SAP events.

6. You need to note down the Program ID value. This value will be used when registering the SAP Adapter with the SAP R/3 system as a RFC destination.

7. Navigate to the Adapters folder and select SAP icon under it. Create a SAP connection instance.

8. Connect to the SAP instance and browse the IDOCs.

9. Select the Create Inbound JCA Service (Event) option. Link it to the SAP Channel created in previous step.

The SAP IDOC WSDL extension is shown in the figure. <binding name="jcabinding" type="DEBMAS01:DEBMAS01PortType"> <pc:inbound_binding AddonNamespace="http://xmlns.oracle.com/pcbpel/iWay/wsdl/SAP/sap_jca/DEBMAS01/event/" XMLRecordConverterCallout="oracle.tip.adapter.fw.record.iway.IWayInboundXMLRecordConverterImpl"/> <operation name="DEBMAS01"> <jca:operation ActivationSpec="com.iwaysoftware.afjca15.IWAFActivationSpec" AdapterName="SAP" ChannelName="SAPChannel"> <input/> </jca:operation> </operation> </binding> <service name="DEBMAS01"> <port name="DEBMAS01" binding="DEBMAS01:jcabinding"> <jca:address ResourceAdapterClassName="com.iwaysoftware.afjca15.IWAFResourceAdapter" ra.IWayHome="c:\OracleBPM\adapters\application" ra.IWayConfig="jca_sample" ra.LogLevel="DEBUG"/> </port> </service>

10. The WSDL extension has 2 parts : a service part defining the address or location of a

service and the binding part that defines the implementation of the service. The above figure points to the <service> element. The <jca:address> tag contains the JNDI location of the ManagedConnectionFactory of the JCA 1.5 Resource Adapter and has to be match with one of the <connector-factory> elements of the corresponding oc4j-ra.xml. The <binding> element in the above WSDL defines the JCA interactions and contains the <jca:operation> element. The <jca:operation> element has contains the ActivationSpec classname and the name-value pairs for the ActivationSpec parameters.

Configuring the BPEL process to receive the SAP IDOC 1. The Jdeveloper steps are shown in the following figure. Start the BPEL Process

Manager engine. This in turn starts the WSIL servlet as well. 2. Create a BPEL process using the synchronous process template. The default “Client”

partnerlink and the “inputVariable” and “outputVariable” gets generated. Please refer to the BPEL PM Developer’s Guide for further details.

3. Drag & drop a Partner Link. Select the WSIL browser (torch light option).

4. Choose the DEBMAS01_receive.wsdl. Configure the Partner Link as shown in the following figure.

5. Drag & drop a receive activity and point to the partner link.

6. Configure an end to end BPEL process.

Registering the SAP Adapter as an RFC Server Refer to the Oracle AS Adapter for SAP 10.1.2 documentation for full details. This document shows a subset of those steps. 1.Execute the SM59 transaction to create the RFC Destination and register the SAP Adapter with ProgramID BPEL. This should be the same ProgramID as the SAP Adapter Channel. .

2. Configure a Port for the above RFC destination. Execute WE21 transaction

3. Execute SALE transaction for configuring a logical system

4. Create Partner Profile by executing we20 transaction

5. Create a distribution model – execute BD64 transaction

Deployment and Testing of the BPEL process

1. Set the OC4J-ra.xml of the Oracle AS Adapter for SAP to point to the correct JCA repository project as shown in the following figure.

<?xml version="1.0"?> <!DOCTYPE oc4j-connector-factories PUBLIC "-//Oracle//DTD Oracle Connector 9.04//EN" "http://xmlns.oracle.com/ias/dtds/oc4j-connector-factories-9_04.dtd"> <oc4j-connector-factories> <connector-factory location="eis/OracleJCAAdapter/DefaultConnection" connector-name="IWAFJCA10"> <config-property name="IWayHome" value="c:\OracleBPM\adapters\application"/> <config-property name="IWayConfig" value="jca_sample"/> <config-property name="IWayRepoURL" value=""/> <config-property name="IWayRepoUser" value=""/> <config-property name="IWayRepoPassword" value=""/> <config-property name="logLevel" value="debug"/> </connector-factory> </oc4j-connector-factories>

2. Deploy the BPEL process and Restart the BPEL server. 3. Navigate to the SAP GUI and execute BD12 transaction.

4. Navigate to the BPEL Console to see the output of the BPEL process triggered by the SAP Adapter event.


Recommended