Modeling an Outbound Handshake Modeling an Inbound Handshake

Oracle JCA Adapter for Sockets 5-19 ... xmlns:socket=http:www.oracle.comXSLTransformjavaoracle.tip.adapter.socket.P rotocolTranslator xsl:template match= -- Read the user name -- xsl:variable name=username select=socket:socketReadterminated,terminatedBy=, -- Read password if user name is correct -- xsl:if test=normalize-spaceusername=user xsl:variable name=password select=socket:socketReadterminated,terminatedBy=; -- If password is correct proceed to read the payload using translator -- xsl:if test=normalize-spacepassword=password -- Send an OK -- xsl:variable name=ack1 select=socket:socketWrite001,, output -- Wait for the payload -- xsl:copy-of select=socket:socketReadWithXlation output xsl:if -- Send an error -- xsl:elsexsl:variable name=ack2 select=socket:socketWrite000,, xsl:else xsl:if xsl:template xsl:stylesheet

5.4.3 Designing an XSL File Using the XSL Mapper Tool

You can design an XSL file by using the XSL mapper tool for Oracle Socket Adapter. The following sections describe the procedure for designing XSL for different communication scenarios: ■ Section 5.4.3.1, Designing XSL for Inbound Synchronous RequestReply ■ Section 5.4.3.2, Designing XSL for Outbound Synchronous RequestReply

5.4.3.1 Designing XSL for Inbound Synchronous RequestReply

This section describes the procedure for designing XSL for an inbound synchronous requestreply scenario by using the XSL mapper tool: Note: To perform this use case, you require the following files from the artifacts.zip file contained in the Adapters-101SocketAdapterHelloWorld sample: ■ artifactsschemasHelloWorld.xsd You can access the Adapters-101SocketAdapterHelloWorld sample on the Oracle SOA Sample Code site. Copy this file to the HelloWorldComposite\xsd folder under the HelloWorldComposite project. 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.