In Business Payload, select Field within the Object. Click Browse in the Payload Fields Options section to select a field that will

7-26 Oracle Fusion Middleware Users Guide for Technology Adapters Figure 7–16 The Type Chooser Dialog

20. Select SERVICE from the list, as shown in

Figure 7–16 , and then click OK. The Messages page reappears, with the Schema Location and Schema Element fields populated, as shown in Figure 7–17 . Figure 7–17 The Adapter Configuration Wizard Messages Page

21. Click Next.

The Finish screen is displayed. This page shows the path and name of the adapter file that the wizard creates. Oracle JCA Adapter for AQ 7-27

22. Click Finish.

You have created an AQ Adapter service with dequeue operation.

23. Click OK.

7.4.1.1.4 Generated WSDL and JCA Files

The adapter service generates a WSDL and a JCA file to serve as the defined adapter interface. The following is the WSDL file generated for the dequeue operation: definitions name=Inbound targetNamespace=http:xmlns.oracle.compcbpeladapteraqInbound xmlns=http:schemas.xmlsoap.orgwsdl xmlns:tns=http:xmlns.oracle.compcbpeladapteraqInbound xmlns:plt=http:schemas.xmlsoap.orgws200305partner-link xmlns:obj1=http:xmlns.oracle.comxdbSCOTT xmlns:imp1=http:www.oracle.comservicecontract types schema attributeFormDefault=qualified elementFormDefault=qualified targetNamespace=http:xmlns.oracle.compcbpeladapteraqInbound xmlns=http:www.w3.org2001XMLSchema xmlns:tns=http:xmlns.oracle.compcbpeladapteraqInbound xmlns:hdr=http:xmlns.oracle.compcbpeladapteraqinbound xmlns:obj1=http:xmlns.oracle.comxdbSCOTT import namespace=http:xmlns.oracle.comxdbSCOTT schemaLocation=xsdSCOTT_SERVICE_TYPE.xsd import namespace=http:xmlns.oracle.compcbpeladapteraqinbound schemaLocation=xsdaqAdapterInboundHeader.xsd complexType name=HeaderCType sequence element name=QueueHeader type=hdr:HeaderType element name=PayloadHeader type=obj1:SERVICE_TYPE sequence complexType element name=Header type=tns:HeaderCType schema schema xmlns=http:www.w3.org2001XMLSchema import namespace=http:www.oracle.comservicecontract schemaLocation=xsdservice.xsd schema types message name=SERVICE_msg part name=SERVICE element=imp1:SERVICE message message name=Header_msg part name=Header element=tns:Header message portType name=Dequeue_ptt operation name=Dequeue input message=tns:SERVICE_msg operation portType plt:partnerLinkType name=Dequeue_plt plt:role name=Dequeue_role plt:portType name=tns:Dequeue_ptt plt:role plt:partnerLinkType definitions 7-28 Oracle Fusion Middleware Users Guide for Technology Adapters

7.4.1.2 Dequeuing and Enqueuing Object and ADT Payloads

Dequeuing and enqueuing is covered in Section 7.4.2, Oracle AQ Adapter ADT Queue . To enqueue or dequeue the entire object as the payload, perform the following: ■ Select Enqueue or Dequeue in Step 10. ■ Select Whole Object CUSTOMER_TYPE, and skip to Step 16. For a working example of an ADT payload use case, refer to any of the following samples: ■ adapters-aq-102-adt ■ adapters-aq-110-supportedadttypes You can obtain these samples by accessing the Oracle SOA Sample Code site, and selecting the Adapters tab.

7.4.1.3 Dequeuing One Column of the Object Payload

The walkthrough is an example of dequeuing one field or column within an object payload. To create an Oracle AQ Adapter that dequeues one field in an object, you must perform the following steps in the Adapter Configuration Wizard Object Payload page:

1. Select Field within the Object.

2. Click Browse at the end of the Field Name field.

The Select Payload Field dialog is displayed.

3. Select a field that will contain the business payload, and then click OK.

The Adapter Configuration Wizard Object Payload page with Field Name field populated with the field that you selected is displayed, as shown in Figure 7–18 . Note: If you create an ADT type queue and drop both the queue and the data types created for that queue and redeploy the process, then it throws a SQL exception and you must restart the Database. To avoid this, you must drop only the queues and not the data types. Oracle JCA Adapter for AQ 7-29 Figure 7–18 The Adapter Configuration Wizard Object Payload Page

4. Select Access to non-payload fields also needed, and then click Next.

The following segment of the generated JCA file specifies that one field, in this case the field named PAYLOAD, is dequeued in addition to payload header fields. adapter-config name=Inbound adapter=AQ Adapter xmlns=http:platform.integration.oracleblocksadapterfwmetadata connection-factory location=eisAQaqSample UIConnectionName=Connection1 adapterRef= endpoint-activation portType=Dequeue_ptt operation=Dequeue activation-spec className=oracle.tip.adapter.aq.inbound.AQDequeueActivationSpec property name=QueueName value=SERVICE_IN_QUEUE property name=ObjectFieldName value=PAYLOAD property name=PayloadHeaderRequired value=true property name=SchemaValidation value=false activation-spec endpoint-activation adapter-config For a working example of an ADT CLOB use case where one field or column within an object payload is dequeued, refer to the following samples: ■ adapters-aq-103-adtclobpayload ■ adapters-aq-105-adtclobopaquepayload You can obtain these samples by accessing the Oracle SOA Sample Code site, and selecting the Adapters tab.

7.4.1.4 Configuring the EnqueueDequeue Operation Type

This use case walks you through the procedure for configuring the EnqueueDequeue operation type of the Oracle AQ Adapter, which lets the Oracle AQ Adapter put outgoing messages on a queue and expect response messages on a different queue. 7-30 Oracle Fusion Middleware Users Guide for Technology Adapters This section includes the following topics: ■ Section 7.4.1.4.1, Meeting Prerequisites ■ Section 7.4.1.4.2, Creating an Application and an SOA Project ■ Section 7.4.1.4.3, Defining an Oracle AQ Adapter Service ■ Section 7.4.1.4.4, Wiring Services and Activities ■ Section 7.4.1.4.5, Deploying with JDeveloper ■ Section 7.4.1.4.6, Monitoring Using the Fusion Middleware Control Console ■ Section 7.4.1.4.7, Generated WSDL and JCA Files

7.4.1.4.1 Meeting Prerequisites

To perform this use case, you must have access to a database with the SCOTT schema. Also, you require the following files from the artifacts.zip file contained in the adapters-aq-104-requestreply sample: ■ create_queues.sql ■ drop_queues.sql ■ enqueue.sql ■ SendReply.sql ■ setup_user.sql To obtain the adapters-aq-104-requestreply sample code, access the Oracle SOA Sample Code site, and select the Adapters tab.

7.4.1.4.2 Creating an Application and an SOA Project

You must create a JDeveloper application to contain the SOA composite. Follow the steps documented in Section 7.4.1.1.2, Creating an Application and an SOA Project to create a new application, and an SOA project.

7.4.1.4.3 Defining an Oracle AQ Adapter Service

Perform the following steps to create an Oracle AQ Adapter service to put outgoing messages on a queue and expect response messages on a queue:

1. In the Component Palette, select SOA.

2. Drag and drop AQ Adapter from the Service Adapters list to the Exposed Services

swim lane in the composite.xml page. The Adapter Configuration Wizard Welcome page is displayed.

3. Click Next.

The Adapter Configuration Wizard Service Name page is displayed, as shown in Figure 7–5 .

4. Specify a service name, and then click Next.

The Adapter Configuration Wizard Service Connection page is displayed. 5. Click the plus icon to create a new database connection. The Create Database Connection page is displayed. Oracle JCA Adapter for AQ 7-31 6. Enter the following information:

a. For Create Connection In, choose Application Resources.

b. In the Connection Name field, specify a unique name for the database

connection.

c. From the Connection Type box, select Oracle JDBC.

d. In the UserName field, specify the user name to be authorized for access to the

database. In this example, type scott. e. In the Role field, enter a role, if applicable. This must be a specific database role, such as SYSDBA, as defined in the database. This field is optional. In this example, leave the Role field blank.

f. In the Password field, specify the password to be associated with the specified

user name. In this example, type tiger.

g. Select Save Password and Deploy Password.

h. From the Driver list, select thin.

i. In the Host Name field, enter a value to identify the computer running the

Oracle server. Use an IP address or a host name that can be resolved by TCPIP, for example, myserver. The default value is localhost.

j. In the JDBC Port field, enter a value to identify the TCPIP port. The default

is 1521.

k. In the SID field, enter a value for the unique system identifier SID of an

Oracle database instance. The default is XE.

l. Click Test Connection to determine whether the specified information

establishes a connection with the database. A Success message is displayed.

m. Click OK.

The Connection you created is displayed in the Connection field in the Service Connection page. Also, the JNDI Name field is populated after you created the database connection. The value specified in the JNDI name must exist in the Oracle AQ Adapter weblogic-ra.xml file to ensure that the adapter runs in managed mode. A default connection instance eisAQaqSample is shipped and can be used as the default value for this field. To use this connection instance, it would still require that a data source is created with the JNDI name jdbcaqSample.

7. Click Next.

Note: You must connect to the database where Oracle Applications is running. 7-32 Oracle Fusion Middleware Users Guide for Technology Adapters The Adapter Configuration Wizard Adapter Interface page is displayed.

8. In the Adapter Interface page, choose Define from operation and schema

specified later .

9. Click Next.

The Operation page is displayed.

10. Select EnqueueDequeue, as shown in

Figure 7–8 . Figure 7–19 The Adapter Configuration Wizard Operation Page

11. Click Next.

The Adapter Configuration Wizard Queue Name page is displayed, as shown in Figure 7–9 . Oracle JCA Adapter for AQ 7-33 Figure 7–20 The Adapter Configuration Wizard Queue Name Page

12. Click Browse to browse for a request queue.

The Select Queue dialog is displayed, as shown in Figure 7–21 . Figure 7–21 The Select Queue Dialog