Previous Topic Next topic Print topic


To Configure a REST Web Service

Use this procedure to create or modify a REST web service configuration for an Enterprise Server for .NET CICS region.
  1. Open the region startup file in the editor, and expand the Region item.
  2. Right-click on the Web Services item and choose Add. The Add New REST Path dialog appears.
  3. Enter the path for the REST service or services. The path may include ? and * wildcard characters. For example, /rest/default/AB* would let clients invoke any transaction with a name that starts with AB, using a URL like http://hostname:port/rest/default/AB00.
  4. Optionally, after dismissing the dialog, select the path you added to change its properties. The properties pane for the service is displayed.
  5. Using the properties pane you can:
    • Specify the commarea encoding. Possible encodings are Default, Auto, Text, and Binary. If the commarea contents for the service will always be text or binary, choosing the corresponding option may improve performance. Most services should work correctly regardless of this setting. The Default and Auto settings are the same, and cause Enterprise Server for .NET to determine a usable encoding dynamically for each request.
    • Set a minimum and maximum size for the commarea. The minimum size setting is useful if the server may need to send back a commarea that is larger than the one used in the request. The maximum size setting can be used to prevent a client from requesting an excessively large commarea.
    • Add headers to the HTTP response. To add a header, click the + toolbar button in the lower part of the properties pane, then specify the name and value of the header in the dialog. This is most often used to set an Access-Control-Allow-Origin header for an AJAX service.
To make the web service available, restart the region.

The region must have an HTTP listener channel for clients to invoke the web service.

Previous Topic Next topic Print topic