Link the sockWrite function in the middle pane to the target input node on

Oracle JCA Adapter for Sockets 5-29

22. Click File, Save All. The request.xsl and reply.xsl files for the inbound Oracle

Socket Adapter are created.

5.4.3.2 Designing XSL for Outbound Synchronous RequestReply

This section describes the procedure for designing XSL for an outbound synchronous requestreply scenario by using the XSL mapper tool: Design an SOA Composite To design an SOA composite, perform the steps described in Section 5.5.1.2, Designing the SOA Composite. . Create an Outbound Oracle Socket Adapter Reference To create an outbound Oracle Socket Adapter reference, perform the following steps:

1. Drag and drop Socket Adapter from the Components Palette to the External

References swim lane. The Welcome page of the Adapter Configuration Wizard is displayed.

2. Click Next. The Service Name page is displayed.

3. Enter the service name, HelloWorld in the Service Name field and then click

Next . The Adapter Interface page is displayed.

4. Select Define from operation and schema specified later, as shown in the

Figure 5–16 and click Next. The Operation page is displayed.

5. Select Outbound Synchronous RequestReply as the Operation Type and then

click Next. The Socket Connection page is displayed. 6. Enter eissocketOutboundSocketAdapter in the Socket Connection JNDI Name field and click Next. The Messages page is displayed. 7. Click Browse For Schema File that appears at the end of the URL field in the Request Message Schema box. The Type Chooser dialog is displayed.

8. Click Project Schema Files, HelloWorld.xsd, and HelloWorldProcessRequest, as

shown in Figure 5–18 .

9. Click OK. The URL field in the Messages page is populated with the

HelloWorld.xsd file. Note: To perform this use case, you require the following files from the artifacts.zip file contained in the Adapters-101SocketAdapterHelloWorld sample: ■ artifactsschemasHellowWorld.xsd You can access the Adapters-101SocketAdapterHelloWorld sample on the Oracle SOA Sample Code site. Copy the HelloWorld.xsd file to HelloWorldComposite\xsd under the HelloWorldComposite project: Note: The steps provided in Section 5.5.1.2, Designing the SOA Composite are applicable to a composite with Oracle BPEL PM. Alternatively, you can create a composite with Mediator. 5-30 Oracle Fusion Middleware Users Guide for Technology Adapters

10. Click Browse For Schema File that appears at the end of the URL field in the

Reply Message Schema box. The Type Chooser dialog is displayed.

11. Click Project Schema Files, HelloWorld.xsd, and HelloWorldProcessResponse.

12. Click OK. The URL fields in the Messages page are populated with the

HelloWorld.xsd files, as shown in Figure 5–19 .

13. Click Next. The Protocol page is displayed.

14. Select Use XSLT to define the handshake.

15. Click the create new xsl file icon that appears at the end of the Xslt field. The

Input dialog appears.

16. Use the default value, invoke.xsl, as the name of the XSL file and click OK.

17. Click Finish. The invoke.xsl file appears in the XSL mapper tool, as shown in

Figure 5–29 . Figure 5–29 The JDeveloper - invoke.xsl Page

18. Right-click the HelloWorldProcessResponse element on the target side. A menu is

displayed, as shown in Figure 5–30 . Oracle JCA Adapter for Sockets 5-31 Figure 5–30 The JDeveloper - invoke.xsl Page 19. Click Add Variable.... The Add Variable dialog is displayed, as shown in Figure 5–31 . Figure 5–31 The Add Variable Dialog

20. Enter var1 in the Local Name field, and click OK. The var1 variable is added to

the target pane of the XSL mapper tool.

21. From the Component Palette list, select Advanced; then, select Advanced

Functions . A list of advanced functions is displayed.

22. Define the request part of the outbound synchronous requestreply operation, to

write the data to the socket server, as follows:

a. Drag and drop socketWriteWithXlation from the Advanced Functions list of

the Component Palette to the middle pane, as shown in Figure 5–32 . 5-32 Oracle Fusion Middleware Users Guide for Technology Adapters Figure 5–32 The JDeveloper - invoke.xsl Page

b. Drag the var1 node to the socketWriteWithXlation function. A link is created,

as shown in Figure 5–33 . Figure 5–33 The JDeveloper - invoke.xsl Page

c. Double-click the socketWriteWithXlation advanced function. The Edit

Function - socketWriteWithXlation dialog appears.

d. Enter a dot . in the NodeList field, as shown in

Figure 5–34 .