Trading Networks 10.3 | Administering and Monitoring B2B Transactions | Service Development Help | Working with REST | Generating a REST Resource Using the Legacy Approach | Creating a REST Resource Using the Legacy Approach
 
Creating a REST Resource Using the Legacy Approach
Consider the following when using Designer to create a REST resource:
*The REST resource name must be unique across the entire Integration Server namespace. That is, the fully qualified name of the REST resource must be unique on the Integration Server.
*You can select the HTTP methods for which you want Designer to create a service.
*You can instruct Designer to create a _default service to handle the HTTP methods for which there is not a specific service.
*The format of the request URI depends on the location of the REST resource. For more information about the format of the request URI, see the REST Developer’s Guide.
*To create a REST resource using the legacy approach
1. In the Service Development perspective, select File > New > REST Resource.
2. In the New REST Resource dialog box, select REST Resource as the type of REST resource to create.
3. Select the package or folder in which you want to create the REST resource.
4. In the REST resource name field, type a name for the REST resource using any combination of letters, numbers, and/or the underscore character. For information about restricted characters, see About Element Names.
5. Click Next.
6. Under HTTP methods, select the check box next to the methods for which you want to create a separate service. Select the Default check box to create a service that handles any methods that are not selected.
Note:
You can select Default only if at least one of the HTTP methods is not selected.
7. Click Finish.
Designer creates the REST resource folder and generates services for the selected HTTP methods.
*Notes:
*The signatures for the flow services generated by Designer contain only the input parameters $resourceID and $path which are required by Designer. These parameter are optional and can be deleted.
You might delete $resourceID and/or $path if your REST application does not use the values supplied by those variables.
*The _default service also contains a required input parameter named $httpMethod.
*After creating the services, you need to modify the service signature to include any additional input parameters expected by the service and any output parameters produced by the service.
*The services generated by Designer are empty. You must add processing logic to the generated services.