Wednesday, June 9, 2010

Invoking SAP BAPIs from Oracle BPEL

The Oracle AS Adapter for SAP (SAP Adapter) exposes the SAP BAPIs/iDocs as a service via WSDL with JCA binding. The Application Explorer is used to configure the SAP Adapter. WSDL files can be created for both JCA Outbound (Request-Response service – BPEL invoke) and JCA Inbound (Event Notification – BPEL receive) Interactions and saved to a specific directory on server.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 Adapter Application Explorer.

This post describes how to configure the SAP Adapter to generate WSDL out of a SAP BAPI and use it inside an Oracle BPEL process.

Application Explorer Configuration :

Create a new JCA project and this name will be later used while configuring connection factory in oc4j-ra.xml/ra.xml(for weblogic)





Provide the SAP System login credentials.




As you can see below once the connection to SAP has been established we can browse through the BOR(Business Object Repository) and select a particular BAPI Interface and generate WSDL from it for integration purpose.





In 11g apart from the .wsdl file 2 more files are generated, one a .jca file and other .xsd (with schema for request-response) in $SOA_HOME/soa/thirdparty/ApplicationAdapters/wsdls directory.
Jdeveloper Configuration :
In Jdeveloper create a BPEL process and add a partner link. Using service explorer tab in the partner link configuration search for the WSDL generated from Application Explorer under adapters section. 

Note for SOA 11G, in order to access the BAPI WSDLs (or similar JCA adapter files)you need a third party adapter service which comes with Jdeveloper version 11.1.1.2.0 . So make sure you have this version of Jdev for development.



Also in 11G you need to copy the *.wsdl, *.jca and *.xsd files to the local machine for configuring the third party adapter service.
Once the above changes are done, before running the BPEL process you have to modify the oc4j-ra.xml/ra.xml(for weblogic) and make sure the property IWayConfig is set to the JCA Project name which we created earlier in Application Explorer. Bounce the BPEL/ WLS server and run the BPEL process.

2 comments:

  1. This post is very useful. Thanks for sharing.

    ReplyDelete
  2. Hi,

    Thanks for such a useful post. I am doing a similar kind of exercise wherein I am trying to connect to Siebel 8.0 (which is running on Windows XP sp2) from Application Explorer (swing based GUI provided by Oracle). While connecting I face problems like mentioned on my post here https://forums.oracle.com/forums/message.jspa?messageID=10003720#10003720

    I am not sure if the Siebel 8.0 is supported by Application explorer ( I even tried to connect the Siebel Java DataBean using a Java consle based applications, it didnt connect).

    Appreciate if you can share your thoughts on this if you have ever done the integration with Siebel 8.0 . Ideally this should have been very straight forward.

    Thanks
    Jameel
    jameel.j2ee@gmail.com

    ReplyDelete