INT010A - JSON Service - Define Server-side logic
You need to create a service entry that tells JSMDirect which LANSA function or other program is used to process web service requests for the web service you have defined.
1. Switch to the Studio Workspace tab of the LANSA Integrator Studio.
2. Expand the Services folder. You will have defined your Service entry in an earlier exercise.
3. Select and right click on the required Service to open the context menu.
4. Choose Open Service from the context menu.
This opens the Direct Services tab which shows the current entries in table DC@W29 for an IBM i JSM Server or file DC_W29.txt for a Windows JSM Server.
5. You need to create a new entry so right click in the empty space … and choose New from the context menu to open the Direct Service Editor.
6. In the Direct Service Editor, complete the details for your service entry that will connect your web service. For this exercise, enter:
7. When complete, press OK to save the Service entry details.
8. Press OK again.
You will be returned to the Direct Services tab where you will see your Services entry in the JSMDirect Services list.
9. Close the Direct Services tab by right clicking and selecting Close from the context menu. The Open Service option will also have opened a Proxy Services tab. You can also close this tab.
You have completed the building of your LANSA Integrator JSON server solution. What you have built and LANSA Integrator has generated, is the code necessary to handle all the protocol and format details to receive and respond to web service requests, to unwrap and extract the parameters and to build the JSON response. You will now build the business logic to support it.