Application Integration (On-Premises) : Creating REST applications : Setting Up Your REST Application : Setting Up a REST Application on Integration Server : Services
Services
When you build a REST application on your Integration Server, you must include services that correspond to the HTTP methods you want to provide for each resource. These services must be named as follows:
Service
Description
_get
Performs the GET method.
_put
Performs the PUT method.
_post
Performs the POST method.
_delete
Performs the DELETE method.
These services reside in folders on your Integration Server in a directory structure that is specific to your application. For example, the discussion application described in How webMethods Integration Server Processes REST Requests might have the following structure as viewed from Software AG Designer:
In addition to the _get, _put, _post, and _delete services, you can also place a special service named _default in one or more of the application folders. Integration Server executes this service if a REST request specifies an HTTP method that is not represented by a service in the folder. For example, suppose the folder contains the _get, _put, and _post services, but no _delete service. If the client issues a DELETE request, Integration Server will execute the _default service, and pass “DELETE” to it in the $httpMethod variable.
If a request specifies an HTTP request method that is not represented by a service in the folder and there is no _default service in the folder, the request fails with error “404 Not Found” or “405 Method Not Allowed.” Integration Server issues 404 if the first token in the URI does not exist in the namespace, or 405 if one or more tokens in the URI identify elements in the namespace but the URI does not correctly identify a REST resource folder and a service to execute.
Example 1
A REST resource’s folder contains the _get, _post, and _default services:
If the client sends a...
Integration Server responds by...
GET request
Executing the _get service
POST request
Executing the _post service
DELETE request
Executing the _default service
Example 2
A REST resource’s folder contains the _get, _put, and _delete services:
If the client sends a...
Integration Server responds by...
GET request
Executing the _get service
PUT request
Executing the _put service
POST request
Issuing error “405 Method Not Allowed”
Additional possible uses for the _default service are:
*Direct all REST requests through common code before branching off to individual GET, PUT, POST, or DELETE methods.
*Make PUT and POST processing the same by directing PUT and POST requests to the same code.
Copyright © 2015- 2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback