Developing OTDs for Communication Adapters

Collaboration Example

The following example shows a simple Java Collaboration that retrieves the HTTP method from the Request node through the Method property. This creates an HTML response indicating the HTTP method. This method is retrieved from the request, sets the ContentType property as “text/html” on the Response node. It then sets the Text property with the HTML response, and then calls the sendResponse() method. This is called on the HTTP server input OTD to send the constructed response to the HTTP client.

Figure 1–5 sendResponse() Example

sendResponse() Example