Software AG Products 10.7 | Integrating On-Premises and Cloud Applications | Service Development | Creating Client Code | Building a Browser-Based Client | URL Client Uses to Invoke Services
 
URL Client Uses to Invoke Services
When embedding an URL that invokes a service into a web page of a browser-based client, you can use either HTTP GET or HTTP POST. The URL for either method is similar to the following:
Item
Description
1
Identifies the Integration Server where the service to invoke resides.
2
Specifies the required keyword “invoke”, which tells Integration Server that the URL identifies a service that is to be executed.
3
Identifies the folder in which the service to invoke resides. Separate subfolders with periods. This folder name is case sensitive. Be sure to use the same combination of upper and lower case letters as specified in the folder name on Integration Server.
4
Identifies the service that you want to invoke. The service name is case sensitive. Be sure to use the same combination of upper and lower case letters as specified in the service name on Integration Server.
5
Specifies the input values for the service. Specify a question mark (?) before the input values. The question mark signals the beginning of the query string that contains the input values. Each input value is represented as variable=value. The variable portion is case sensitive. Be sure to use the same combination of upper and lower case letters as specified in your service. If your service requires more than one input value, separate each variable=value with an ampersand (&).
Note:
Only specify the query string portion of the URL when using the HTTP GET method.
Note:
If you are serving the web pages that invoke services from an Integration Server, you can use a relative URL to invoke the service. By doing so, you can serve the exact web page from several servers without having to update the URLs.
HTTP GET Method
To use the GET method, embed a URL that includes all the input values for the service in the query string portion of the URL. When the server receives the URL, it translates the input values into an IData object. For more information about how the server creates the IData object that it sends to the service, see How Input Values are Passed to the Service the Browser-Based Client Invokes.
HTTP POST Method
To use the POST method, create an HTML form in your web page. Create fields in the HTML form in which a user will supply the input information. The values you specify for the NAME attributes of the HTML form fields should match the names of input values that the service expects. Be sure to use the exact combination of upper and lower case letters as specified in your service. For example, if your service requires the input values sku and quantity, you might create an HTML form with the following fields:
<SELECT NAME="sku">
<OPTION VALUE="A1">A1</OPTION>
<OPTION VALUE="B2">B2</OPTION>
<OPTION VALUE="C3">C3</OPTION>
</SELECT>
 
<INPUT TYPE="TEXT" NAME="quantity" VALUE="1">
Specify the URL for the service in the ACTION attribute and “POST” in the METHOD attribute. For example:
<FORM ACTION="/invoke/sample.webPageDemo/getProductCost" METHOD="POST">
After the user fills in the form and submits it, the web browser creates a document that contains the information the user supplied in the HTML form (performs an HTTP POST). The browser invokes the URL identified in the ACTION attribute, which invokes the service on Integration Server, and the browser posts the document that contains the user’s input information to Integration Server. For more information about how the server creates the IData object that it sends to the service, see How Input Values are Passed to the Service the Browser-Based Client Invokes.