Designing XSL for Inbound Synchronous RequestReply

5-20 Oracle Fusion Middleware Users Guide for Technology Adapters 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 Inbound Oracle Socket Adapter Service To create an inbound Oracle Socket Adapter service, perform the following steps:

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

Services 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. Figure 5–16 The Adapter Configuration Wizard - Adapter Interface Page

5. Select Inbound Synchronous RequestReply as the Operation Type and then click

Next . The Socket Connection page is displayed.

6. Enter eissocketInboundSocketAdapter in the Socket Connection JNDI

Name field, as shown in Figure 5–17 , and click Next. The Messages page is displayed. 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. Oracle JCA Adapter for Sockets 5-21 Figure 5–17 The Adapter Configuration Wizard Socket Connection Page

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 . Figure 5–18 The Type Chooser Dialog

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

HelloWorld.xsd file. 5-22 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 . Figure 5–19 The Adapter Configuration Wizard File Messages Page

13. Click Next. The Protocol page is displayed, as shown in

Figure 5–20 . Oracle JCA Adapter for Sockets 5-23 Figure 5–20 The Adapter Configuration Wizard - Protocol Page

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, as shown in Figure 5–21 . Figure 5–21 The input Dialog of the Protocol Page 5-24 Oracle Fusion Middleware Users Guide for Technology Adapters

16. Use the default value, request.xsl, as the name of the XSL file, as shown in

Figure 5–21 and click OK.

17. Click the create new xsl file icon that appears at the end of the ReplyXslt field. The

Input dialog appears.

18. Use the default value, reply.xsl, as the name of the XSL file, and click OK.

19. Click Finish. The request.xsl and the reply.xsl files are created.

Figure 5–22 shows the request.xsl page. Figure 5–22 The JDeveloper - request.xsl Page Figure 5–23 shows the reply.xsl page. Note: A dummy.xsd file appears in the left Source pane of the request.xsl page, which is used as the source for the XSL mapper tool. In an inbound request scenario, Oracle Socket Adapter reads native data that is received by the socket and converts it to an XML format. That is, on the source side there is no XML file. Because the XSLT mapper always needs source and target XSD files, a dummy XSD file appears in the mapper tool. Oracle JCA Adapter for Sockets 5-25 Figure 5–23 The JDeveloper - reply.xsl Page 20. Define the request part of the inbound synchronous requestreply operation as follows:

a. In the request.xsl page, drag and drop socketRead from the Advanced

Functions list of the Components Palette to the middle pane, as shown in Figure 5–24 . Note: A dummy.xsd file appears in the right target pane of the reply.xsl page. This dummy.xsd file is used as the target for the XSL mapper tool. 5-26 Oracle Fusion Middleware Users Guide for Technology Adapters Figure 5–24 The JDeveloper - request.xsl Page

b. Double-click the socketRead advanced function. The Edit Function -

socketRead dialog appears.

c. Enter the function parameters in the nxsdStyle and nxsdStyleAttributes

fields, as shown in Figure 5–25 . Figure 5–25 The Edit Function - socketRead Dialog Note: The socketRead function reads from the socket input stream by using the StyleReader exposed by the NXSD framework.