Create a reference binding component entry in the composite.xml file that uses

Invoking an Asynchronous Web Service from a BPEL Process 8-13 Use TCP tunneling to view SOAP messages exchanged between the BPEL process service component flow and the web service including those containing the correlation ID. You can see the exact SOAP messages that are sent to, or received from, services with which a BPEL process service component flow communicates. You insert a software listener between your BPEL process service component flow and the web service. Your BPEL process service component flow communicates with the listener called a TCP tunnel. The listener forwards your messages to the web service, and also displays them. Responses from the web service are returned to the tunnel, which displays and forwards them back to the BPEL process service component.

8.4.1 How to Use WS-Addressing in an Asynchronous Service

WS-Addressing is a public specification and is the default correlation method supported by Oracle BPEL Process Manager. You do not need to edit the .bpel and .wsdl files to use WS-Addressing.

8.4.1.1 Using TCP Tunneling to See Messages Exchanged Between Programs

The messages that are exchanged between programs and services can be seen through TCP tunneling. This is particularly useful when you want to see the exact SOAP messages exchanged between the BPEL process service component flow and web services. To monitor the SOAP messages, insert a software listener between your flow and the service. Your flow communicates with the listener called a TCP tunnel and the listener forwards your messages to the service, and displays them. Likewise, responses from the service are returned to the tunnel, which displays them and then forwards them back to the flow. To see all the messages exchanged between the server and a web service, you need only a single TCP tunnel for synchronous services because all the pertinent messages are communicated in a single request and reply interaction with the service. For asynchronous services, you must set up two tunnels, one for the invocation of the service and another for the callback port of the flow.

8.4.1.1.1 Setting Up a TCP Listener for Synchronous Services Follow these steps to set up a

TCP listener for synchronous services initiated by an Oracle BPEL Process Manager process: 1. Visit the following URL for instructions on how to download and install Axis TCP Monitor tcpmon http:ws.apache.orgcommonstcpmon 2. Visit the following URL for instructions on how to use tcpmon: http:ws.apache.orgaxisjavauser-guide.html 3. Place axis.jar in your class path. 4. Start tcpmon: C:\...\ java org.apache.axis.utils.tcpmon localport remoteHost port_on_which_remote_server_is_running 5. In the composite.xml file, add the endpointURI property under binding.ws for your flow to override the endpoint of the service. 8-14 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite 6. From the operating system command prompt, compile and deploy the process with ant. Note that the same technique can see the SOAP messages passed to invoke a BPEL process service component as a web service from another tool kit such as Axis or .NET.

8.4.1.1.2 Setting Up a TCP Listener for Asynchronous Services Follow these steps to set up

a TCP listener to display the SOAP messages for callbacks from asynchronous services: 1. Start a TCP listener to listen on a port and to send the Oracle BPEL Process Manager port. a. Open Oracle Enterprise Manager Fusion Middleware Control.

b. From the SOA Infrastructure menu, select SOA Administration Common

Properties .

c. Specify the value for Callback Server URL. This URL is sent by the server as

part of the asynchronous callback address to the invoker.

2. From the SOA Infrastructure menu, select Administration System MBean

Browser .

3. Expand Application Defined MBeans oracle.soa.config Server : soa_server

SCAComposite . where soa_server is the specific server instance name for example, AdminServer. All the SOA composite applications deployed on the server appear. 4. Follow these steps to set this property on a composite application. This action enables it to apply to all bindings in the composite application. a. Click your composite.

b. Ensure the Attributes tab is selected.

c. In the Name column, click Properties.

d. Click the Add icon.

e. Expand the newly added Element_number appears at the end of the list.

where number is the next sequential number beyond the last property. For example, if the property list contains twelve elements, adding a new property causes Element_13 to be displayed.

f. In the name field, enter oracle.webservices.local.optimization.

g. In the value field, enter false.

h. In the many field, enter false.

i. Click Apply, and then click Return.

j. In the Name column on the Operations tab, click save.

k. Click Invoke to execute the operation.

l. Click Return or click a node in the System MBean Browser pane.

Note: After adding, deleting, or updating a property, you can click the Refresh cached tree data icon in the upper right corner of the System MBean Browser page to see the new data.