How to Use WS-Addressing in an Asynchronous Service

Invoking an Asynchronous Web Service from a BPEL Process 8-15 5. Follow these steps to set this property on a specific binding. a. Expand your composite application. and drill down to the specific SCAComposite.SCAReference.SCABinding folder.

b. Click WSBinding.

c. Perform steps 4b through 4l. 6. Initiate any flow that invokes asynchronous web services. You can combine this with the synchronous TCP tunneling configuration to send a service initiation request through your first TCP tunnel. The callbacks from the asynchronous services are shown in the TCP listener. If you are an Oracle JDeveloper user, you can also use the built-in Packet Monitor to see SOAP messages for both synchronous and asynchronous services.

8.5 Using Correlation Sets in an Asynchronous Service

Correlation sets provide another method for directing web service responses to the correct BPEL process service component instance. You can use correlation sets to identify asynchronous messages to ensure that asynchronous callbacks locate the appropriate client. Correlation sets are a BPEL mechanism that provides for the correlation of asynchronous messages based on message body contents. To use this method, define the correlation sets in your .bpel file. This method is designed for services that do not support WS-Addressing or for certain sophisticated conversation patterns, for example, when the conversation is in the form A B C A instead of A B A. This section describes how to use correlation sets in an asynchronous service with Oracle JDeveloper. Correlation sets enable you to correlate asynchronous messages based on message body contents. You define correlation sets when interactions are not simple invoke-receive activities. This example illustrates how to use correlation sets for a process having three receive activities with no associated invoke activities.

8.5.1 How to Use Correlation Sets in an Asynchronous Service

This section describes the steps to perform to use correlation sets in an asynchronous service.

8.5.1.1 Step 1: Creating a Project

To create a project: 1. Start Oracle JDeveloper.

2. From the File main menu, select New Applications.

3. Select SOA Application, and click OK.

The Create SOA Application Wizard appears.

4. In the Application Name field, enter MyCorrelationSetApp.

5. Accept the default values for all remaining settings, and click Next.

6. In the Project Name field, enter MyCorrelationSetComposite.

7. Accept the default values for all remaining settings, and click Next.

8-16 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite

8. In the Composite Template section, select Composite With BPEL Process, and

click Finish. The Create BPEL Process dialog appears. 9. Enter the values shown in Table 8–1 .

10. Accept the default values for all remaining settings, and click OK.

8.5.1.2 Step 2: Configuring Partner Links and File Adapter Services

You now create three partner links that use the SOAP service. This section contains these topics: ■ You create an initial partner link with an adapter service for reading a loan application. ■ You create a second partner link with an adapter service for reading an application response. ■ You create a third partner link with an adapter service for reading a customer response.

8.5.1.2.1 Creating an Initial Partner Link and File Adapter Service

To create an initial partner link and file adapter service: 1. Double-click the MyCorrelationSet BPEL process. 2. In the Component Palette, expand BPEL Constructs. 3. Drag an initial Partner Link activity into the right swimlane of the designer. 4. Click the third icon at the top the Service Wizard icon. This starts the Adapter Configuration Wizard, as shown in Figure 8–4 . Figure 8–4 Adapter Configuration Wizard Startup

5. In the Configure Service or Adapter dialog, select File Adapter and click OK.

6. In the Welcome dialog, click Next.

7. In the Service Name field of the Service Name dialog, enter FirstReceive and

click Next. 8. In the Adapter Interface dialog, accept the default settings and click Next. Table 8–1 Create BPEL Process Dialog Fields and Values Field Value Name Enter MyCorrelationSet. Template Select Asynchronous BPEL Process. Expose as a SOAP Service Select the checkbox. After process creation, note the SOAP service that appears in the Exposed Services swimlane. This service provides the entry point to the composite application from the outside world.