24
ORACLE SUPPORT SERVICES ORACLE E-Business Suite (EBS) 12.1 Integrated SOA Gateway (ISG) Invoking an External Web Service Using the Service Invocation Framework (SIF) Prepared by: Gary Grant Author: Gary Grant Creation Date: Thursday, November 05, 2009 Last Updated: Tuesday, June 15, 2010 Definition: This is an example of how to obtain information from an external source using a published web service using ISG in EBS. Method: The web service will be invoked (launched) from a workflow process. Oracle Workflow is a mature product with a large number of experienced Developers. This allows ISG to be easily understood if it is presented in the context of being integrated into a workflow process. The Service Invocation Framework (SIF) is an enhancement to the Business Event System (BES) with the introduction of seeded web service subscriptions and additional User Interfaces (UI) for specifying the location of the Web Service Definition Language (WSDL) that has been deployed by companies that for others to subscribe and use. Proxy Setup: In order to point to an external URL containing a WSDL, you need to be able to connect through Oracle’s proxy. Update the autoconfig Applications Tier $CONTEXT_FILE with the proxyhost and proxyport. Login to E-Business as a user assigned the System Administrator responsibility and navigate:

ISG Example External2

Embed Size (px)

DESCRIPTION

SOA and workflow integration

Citation preview

  • ORACLE SUPPORT SERVICES

    ORACLE E-Business Suite (EBS) 12.1Integrated SOA Gateway (ISG)

    Invoking an External Web ServiceUsing the Service Invocation Framework (SIF)

    Prepared by: Gary Grant

    Author: Gary Grant

    Creation Date: Thursday, November 05, 2009

    Last Updated: Tuesday, June 15, 2010

    Definition:

    This is an example of how to obtain information from an external source using a published web service using ISG in EBS.

    Method:

    The web service will be invoked (launched) from a workflow process. Oracle Workflow is a mature product with a large number of experienced Developers. This allows ISG to be easily understood if it is presented in the context of being integrated into a workflow process. The Service Invocation Framework (SIF) is an enhancement to the Business Event System (BES) with the introduction of seeded web service subscriptions and additional User Interfaces (UI) for specifying the location of the Web Service Definition Language (WSDL) that has been deployed by companies that for others to subscribe and use.

    Proxy Setup:

    In order to point to an external URL containing a WSDL, you need to be able to connect through Oracles proxy. Update the autoconfig Applications Tier $CONTEXT_FILE with the proxyhost and proxyport.

    Login to E-Business as a user assigned the System Administrator responsibility and navigate:

  • System Administrator > Oracle Applications Manager > AutoConfig

    In Applications click Edit Parameters

    oacore and oafm oc4j.properties

    Query OA_VAR = proxy

    s_proxyhost= www-proxy.us.oracle.coms_proxyport= 80

    Concurrent Manager Node running Workflow Services adovars.env

    Query OA_VAR = s_appsjreopts

    s_appsjreopts= -Dhttp.proxyHost=www-proxy.us.oracle.com -Dhttp.proxyPort=80

    Run autoconfig:

    sh $ADMIN_SCRIPTS_HOME/adautocfg.sh

    Shutdown and restart the Web Server components:

    sh $ADMIN_SCRIPTS_HOME/adstpall.shsh $ADMIN_SCRIPTS_HOME/adstrtal.sh

    Business Event (SIF) Setup:

    The Business Event System menu UI has been enhanced to enable a web service to be defined and invoked from the UI. A seeded Invoke Web Service Action Type has been created for a Local Java Subscription that will invoke the web service. A new WFERROR Process Subscription DEFAULT_EVENT_ERROR2 has been created and must be added to the event defined to invoke the web service.

    The Local Java Subscription with the seeded Invoke Web Service Action Type will include the following parameters to invoke the web service:

    SERVICE_WSDL_URL - The URL where the Web Services Description Language (WSDL) description for the Web service is located. If the Web service is a BPEL process, you can specify the path of the WSDL description on the BPEL server.

    SERVICE_NAME - The name of the Web service. SERVICE_PORTTYPE - The port type, or set of abstract operations, that includes the

    operation to invoke. SERVICE_OPERATION - The operation to invoke.

  • SERVICE_PORT - A single communication endpoint defined by a combination of a network address and a binding. The binding specifies concrete protocol and data format specifications for the operations and messages defined by the port type.

    SIF Demo:

    Business Event SIF UI:

    This demonstration will show how to a workflow can be used to invoke a web service and retrieve information from an external Internet site. This is a demo created by Vijay Workflow Development Product Manager.

    Workflow Administrator Web Applications > Business Events

    Create oracle.apps.wf.movie.invoke event.

  • Add Subscriptions to the oracle.apps.wf.movie.invoke event.

    Create Local Java Subscription to use seeded Invoke Web Service Action Type.

  • Click Next to add the WSDL URL to be invoked.

    NOTE: The following are all contained in the WSDL and can be obtained by using the WSDL URL in a web browser to see the definition.

  • Click Next to add the WSDL Service Name.

  • Click Next to add WSDL Service Port.

  • Click Next to add WSDL Operation, Port Type and Operation Response.

  • Click Next to add oracle.apps.fnd.wf.bes.WebServiceInvokerSubscription Java Rule Function and the Optional Callback Parameters so the result of the web service invocation will be returned back.

    WFBES_CALLBACK_EVENT receive event WFBES_CALLBACK_AGENT WF_WS_JMS_IN or any other Inbound Queue

  • Create a Workflow Error Subscription to capture web service invocation failures.

  • The workflow error subscription will call item_type = WFERROR and workflow process = DEFAULT_EVENT_ERROR2.

  • The SIF invocation demo now contains 2 subscriptions.

  • Create WFBES_CALLBACK_EVENT oracle.apps.wf.movie.receive receive event.

  • Create the oracle.apps.wf.movie.receive event subscription. The subscription will continue the workflow process that has stopped at the RECEIVE_SERVICE (Receive Service) receive event activity. The phase is set to 100 so it is deferred to the WF_JAVA_DEFERRED queue after being processed from the WF_WS_JMS_IN queue by the Web Services IN Agent. This is a demo of asynchronous processing and is not required.

  • The RECEIVE_SERVICE (Receive Service) receive event activity within the JBES_INVOKER (JBES Web Service Invoker) workflow process will accept the response data from the external web service so it can be accessed and sent in a notification.

    Workflow Type/Name: WFINVDEM

    Workflow Process: JBES_INVOKER

  • The oracle.apps.wf.movie.receive event subscription.

  • Workflow Process:

    A workflow process is used to invoke the web service using SIF.

  • Graphical Design Model:

  • The wokflow can be launched using Developer Studio inside EBS Release 12.1.

    Workflow Administrator Web Applications > Developer Studio

    Type Internal Name: WFINVDEM

  • Launch Parameters Example:

    Item Key: garyinvoke1

    Notification Recipient: SYSADMINWeb Service Callback Event: oracle.apps.wf.movie.receiveInvoker Event: oracle.apps.wf.movie.invokeInvoker Key: garyinvoke1Web Service Callback Agent: WF_WS_JMS_INZip Code: 32822Radius around the Zip in miles: 10

  • Status Monitor Status Diagram View:

    The launched workflow process is waiting for the callback.

  • Notification in the Worklist showing a listing of the all Cinemas in a 10-mile area of zip code 32822 and the show times of their movies.

  • Completion of the process after the callback response is received.

    References:

    This document of the SIF component of ISG is based on the sample demo written by Vijay and is published in his blog entry:

    Invoking Web Service from Oracle Workflow process

    http://blogs.oracle.com/ebusinesssuiteintegration/2009/07/invoking_web_service_from_orac_1.html

  • Note 736404.1 How To Troubleshoot Service Invocation Framework(SIF) In 12.1.1 Integrated SOA Gateway

    Integrated SOA Gateway (ISG)Invoking an External Web ServiceUsing the Service Invocation Framework (SIF)Concurrent Manager Node running Workflow Services adovars.env