In this tutorial, you will create the JSM Binding Script Configuration that uses the LANSA Integrator JSON binding solution that you created in the previous tutorial. Later we will use the new JSM Binding Script Configuration to receive the JSON request.
- Open LANSA Composer and complete the connection to your LANSA Composer server. Select JSM binding scripts in the Navigator at the left. Then click the New tool button to create a new JSM Binding Script Configuration. Complete the details of the new configuration as shown and then click the Save button (or press Ctrl+S).
- Switch to the Script tab and click the Insert button (or use the context menu) and select JSM command from the menu. Repeat the insertion four times, so that you have five empty JSM command directives.
Select each of the JSM command directives in turn, and in the Details area at the bottom, type (or copy and paste) the next JSM command from the list below:
SERVICE_LOAD SERVICE(JSONBindFileService)READ FILE(&MY_JSON_REQUEST)BIND SERVICE(REQUESTTUTORDJSON)TYPE(*INBOUND) BINDTRACE(*YES)CLOSESERVICE_UNLOAD- Click the Insert button (or use the context menu) and select Write binding field values to process sequence variables from the menu. If necessary, use the Move down button (or use the Ctrl+Down Arrow shortcut) until the new directive is positioned before the CLOSE directive. In the Details area at the bottom, click the Edit Bindings button, and then complete the bindings as shown:
- Select the READ FILE(…) command, and click (check) the Perform variable substitution? checkbox in the Details area.
- Select the BIND SERVICE(…) command, and in the Details area at the bottom, click (check) the Exchange fields checkbox.
If you wish, you can use the Insert button or the context menu to insert some comment lines describing what the script is doing. When complete, your script should look similar to this:
When you look at your JSM binding script (as shown above) you should see an asterisk on the line containing the BIND SERVICE command. The asterisk indicates that the Exchange fields checkbox is checked for that line. If you do not see that, then go back to step 6 and make sure you have completed it as instructed.
- Click the Save button (or press Ctrl+S) to save your changes.
Now continue with the following tutorial:
JSM024 – Test the JSM Binding Script Configuration that receives the JSON Request




