Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

These exercises create a web service using JSON types EmployeeDeptSect and Employees

Image Added

  • The JSON client web service will pass a department and section to the server.

  • A list of employees for that department and section will be returned as an array.

  • If only a department is passed, a list of employees in all sections for that department will be returned.

  • If no department and section is provided then all employees for the company will be returned.

...

The following summarizes the steps you will take in the three exercises to build and test your JSON Service:

INT010A – JSON Service – Define Server

  • Define JSON Server Types – the variables to be handled by this service

  • Create a JSON Server solution and JSON Agent solution using the JSON Server Wizard.

  • Map parameters to program variables for both solutions.

  • Build one solution which creates jar file to handle iiiEmployeeDeptSect, which is used in both the client and the server.

  • Build another solution which creates jar file to handle iiiEmployees, which is used in both the client and the server.

  • Use the generated RDMLX to create a function which supports the response for employees and add your business logic

  • Register the function as a JSMDIRECT service

INT010B – JSON Service – Create Client Logic

  • Use the generated RDMLX from INT010A to create a function which supports the request for employees and add your business logic

  • Create the form iiiFRM05 based on the generated RDMLX and add your business logic

INT010C – JSON Service – Test

  • The form accepts department and section code and calls the JSON agent function which calls a service on the server which:

  • Binds to iiiEMPLOYEEDEPTSECT which causes the program variables to be set

  • CALLs the service

  • Web Server invokes JSMDIRECT which runs the function implementing IIIEMPLOYEEJSON

  • Form receives employees list and populates list view to display results.