Outbound Synchronous RequestResponse Communication Modes

5-6 Oracle Fusion Middleware Users Guide for Technology Adapters

5.3.1.3 Inbound Receive

As part of inbound activation, the Oracle Socket Adapter opens a server socket and waits for incoming connections. The adapter uses the connection to the server socket and reads the request message, which is published to BPEL or Mediator. In this scenario, no reply is sent.

5.3.1.4 Outbound Invoke

In the case of an outbound one way invoke scenario, the request comes from BPEL or Mediator. Oracle Socket Adapter connects to the server socket and sends the request message to the server socket on the output stream without expecting a reply.

5.3.2 Mechanisms for Defining Protocols

Communication protocols or handshakes consist of different discrete steps such as authentication procedures, acknowledgments, and sending or receiving data depending on conditions. Oracle Socket Adapter supports the following mechanisms to define the protocol handshakes. ■ Protocol with Handshake Mechanism Using Style Sheet ■ Protocol with Handshake Mechanism Using Custom Java Code ■ Protocol Without Handshake Mechanism

5.3.2.1 Protocol with Handshake Mechanism Using Style Sheet

Oracle Socket Adapter can be configured to use a protocol designed with a handshake mechanism, defined using style sheets that use XPath Extension functions exposed by the adapter. This can be granular read and write operation on the socket IO stream or till the end of the stream. These functions also enable you to use native format constructs for reading and writing data. This handshake mechanism uses XSLT constructs to define operations such as assignments, validations, and control flow. You can use the XPath Extension functions with the translator infrastructure in the following ways: ■ By using StyleReader, which is exposed by the NXSD framework, to read and write from the socket stream using the following methods: – socketReadnxsdStyle:String, nxsdStyleAttributes:String:String You can use this method to read from the socket input stream. – socketWritevalue:String, nxsdStyle:String, nxsdStyleAttributes:String:String You can use this method to write to the socket output stream. The XSLT shown in Figure 5–6 demonstrates the usage of extension functions that use StyleReader. Oracle JCA Adapter for Sockets 5-7 Figure 5–6 XSLT with Extension Functions That Use StyleReader ■ By annotating the schema, which defines the input and output variables, using NXSD constructs to read and write from the socket stream using the following methods: – socketReadWithXlation:DocumentFragment You can use this method to read from the socket input stream by using the schema and schema element configured for input. – socketWriteWithXlationxml:NodeList You can use this method to write to the socket output stream by using the schema configured for output. The XSD file shown in Figure 5–7 demonstrates the usage of extension functions by annotating the schema, which defines the input and output variables, using NXSD constructs.