1.1.2 Representational State Transfer (REST) Support

SALT provides access to existing Tuxedo servers using a simplified HTTP format, following a principle more commonly known as Representational State Transfer (REST). In order to use REST, two new sections will need to be configured in SALTDEPLOY: HTTP/Network to specify the HTTP and/or HTTPS (SSL) port that the gateway will use to listen for REST requests, and HTTP/Services to specify which Tuxedo services are to be exposed and how; the combination of REST service name (arbitrary choice that will identify a REST servicein the calling URL) + HTTP method (GET/POST/DELETE/PUT) will map to the actual Tuxedo service so that CRUD principles can be expressed.

Once enabled, the following will be the behavior at runtime:

  • A client program sends an HTTP message to GWWS. This message contains the verb (GET, POST, PUT or DELETE), headers (content-type, etc.) and URL.
  • "GWWS uses the verb to determine what to do with data: for GET or DELETE, the query string is used to construct a request for the actual Tuxedo service, for POST or PUT, the post data is used.
  • The URL part of the request is used to determine the service to be called: for example, a call such as 'POST http://host:1234/myService' results in GWWS assembling a request for the Tuxedo service mapped to by the 'myService' name in SALTDEPLOY (e.g., 'myService' with GET method may map to a Tuxedo service named BALANCE), converting the reply from FML32 to JSON (assuming service returns FML32) and sending it back to the caller.

The following figure illustrates the REST in GWWS Architecture

Figure 1-2 REST in GWWS Architecture


REST in GWWS Architecture