Before you Begin

In this 15 minute tutorial, you will test the sample Application Service for Music that was created in the first 2 tutorials in this series.


Background

Use the Application Service Framework to create and test Oracle Standard REST Provider Services.

The tutorials in this series describe processes used create the Application Class for the Application Service, create the Application Service and test the Application Service. In this series, you will create a sample Application Service.

Creating a Provider Application Service involves the following steps:

  1. Plan Application Service.
  2. Create an Application Class which will provide the application logic.
  3. Create Application Service.
  4. Create or import a root resource.
  5. Add URI templates.
  6. Add base template parameters to URI Template.
  7. Add method to URI template.
  8. Add input and output parameters to method.
  9. Optionally assign headers for the method.
  10. Define result states for the method.

This is the third tutorial in the Create Application Service series. Read the tutorials in the order listed.


Testing the GET Application Service

To test the Application Service:

  1. Select PeopleTools, Integration Broker, Application Services, Test Application Services.
  2. Expand Search and search for App Service ID MUSIC.
  3. Select MUSIC.
  4. Select the row for GET Rest Method.
  5. Select the Populate URI Template link.
    Description of illustration URI_template_builder.png follows
    Description of the illustration URI_template_builder.png
  6. Click instrument and enter oboe.
  7. Click Done.
  8. Close the URI Builder window. The template parameter is added to the URL.
  9. Click Execute Request.
    Description of illustration app_test_results.png follows
    Description of the illustration app_test_results.png

Testing the POST Application Service

To test the POST Application Service:

  1. Expand the Select a Path Item.

    Note:

    If the tester is no longer open, repeat steps 1 to 3 in Testing the GET Application Service section.
  2. Select the row for the POST REST method.

    Note:

    If the URL is populated from the GET test, you can skip steps 3 to 6.
  3. Click Populate URI Template.
  4. Click instrument and enter oboe.
  5. Click Done.
  6. Close the URI Builder window.
  7. Click the Provide Data link.
  8. Enter the input data in JSON format.
    
    {
        "items" : [
            {
                "musicCode" : 1,
                "player" : "Nancy"
            },
    {
                "musicCode" : 2,
                "player" : "Adam"
            }
        ]
    } 
  9. Click Done.
  10. Click Execute Request.
    Description of the illustration POST_test_results.png follows
    Description of the illustration POST_test_results.png
  11. Click the Request Headers link to view the Request Header.
    Description of the illustration REST_request_header.png follows
    Description of the illustration REST_request_header.png"
  12. Click the Response Header link to view the Response Header.
    Description of the illustration REST_response_header.png follows
    Description of the illustration REST_response_header.png

Learn More