Test the films Web Service Provider

Provides instructions and the code required to send a JSON POST and a JSON GET request to test the films Web service provider.

Now that you have your Web service provider running with all of its resources active, you are ready to interact with the Web service. You can do this using any JSON requester tool.

  1. Create a JSON request with the following endpoint URL:
    http://localhost:5482/cics/services/json/film
  2. Set the method to POST.
  3. Enter the following JSON request and send it to create a new film record:
    {"film-details": [{ 
       "title": "Jaws", "year": "1975", 
       "director": "Steven Spielberg", "format": "VHS" 
    }]} 

    The response should be a status code of 200, and the body should contain the string /cics/services/json/films/Jaws. This is the string placed into the DFHRESPONSE container by the application.

  4. Set the method to GET.
  5. Create and submit a JSON request with the following endpoint URL:
    http://localhost:5482/cics/services/json/film/jaws

    The response should be a JSON message containing the film details placed into the DFHWS-DATA container by the application.

This concludes the tutorial.