Tutorial: Creating a RESTful service and customizing the response format output

This tutorial demonstrates how to customize and test REST services for Project and Project Collection noun. To customize these REST services, you are also customizing entity providers to facilitate new custom response formats.

In one of the previous tutorials: Tutorial: Creating a BOD service module, you implemented the server-side customization to support a new Project service module. This service module included two nouns that represent the recipe data: the Project noun and the Project Collection noun.

In Section 1, you customize the create and test REST services for both the Project and Project Collection nouns. In Section 2, you customize the entity providers to facilitate new custom response formats. This entity provider customization provides you the ability to specify what elements you want returned from each noun and how they appear in the client.

Time required

Expect this tutorial to take 3 hours to complete. The tutorial can take longer if you explore concepts that are related to this tutorial.

Skill level

This tutorial is intended for advanced HCL Commerce developers responsible for customizing REST Services. To complete this tutorial, you should be familiar with the following terms and concepts:
  • REST service
  • CodeGen Pattern tool
  • Java Programming Language
  • Nouns
  • SQL
  • XML
  • XPath
  • HCL Commerce services
  • JSP

System requirements

Before you begin this tutorial, ensure that you complete the following tasks:

Prerequisites

Before you start this tutorial, ensure that you complete the following prerequisites:

  • You must complete the following tutorials so that the Project service module and recipe pages are available on your development machine: Tutorial: Creating a BOD service module
  • Poster add-on for Mozilla Firefox to test REST Services

Tutorial resources

Download the RestfulServiceSource.zip to a temporary directory. This file contains all the code samples used in this tutorial.