In this tutorial you will use LANSA Integrator Studio to create a new JSON binding solution to write a JSON response that will contain the requested batch and order information.
- In the LANSA Integrator Studio window, make sure the GetTutordJSON project window is open. Right-click on Solutions and select New Solution from the popup menu. From the Tool dropdown select JSON Binding Wizard. In Solution Group and solution file type ResponseTutordJSON. Click Yes to create solution group dialog box.

- From the JSON Type Selection dialog box select TutordResponseJSON.

- Select the Configuration tab and change the Package to au.com.ResponseTutordJSON.service.json.
NB: It is good practice to make the Package name unique to other projects. If later you were also to create a new solotion also called au.com.ResponseTutordJSON.service.json then this would overwrite your other instances using this package (name).

- Select the Mapping tab and right click the 'parent' node TutordResponseJSON and select Fragment.

Notice that the two 'child' nodes are now displayed with a red colored diamond and default names are allocated to both the nodes (TUTORDHRESPONSE & TUTORDLRESPONSE) and the individual elements. We will change the individual element name assignments in the following steps. Expand the TUTORDHRESPONSE node and double-click on BatchNumber to open the field attributes. Change this to the field DXBINDF0A.

Repeat for the remaining fields:
Continue to modify TUTORDHRESPONSE changing:
CustomerNumber to DXBINDF0B
OrderNumber to DXBINDF0C
OrderDate to DXBINDF0D
Expand TUTORDLRESPONSE and change:
BatchNumber to DXBINDF0A
OrderNumber to DXBINDF0B
OrderLineNumber to DXBINDF0C
PartNumber to DXBINDF0D
LinePrice to DXBINDF0E
LineQuantity to DXBINDF0F
LineValue to DXBINDF0G
You will use these field names later on when creating the JSM Binding Scripts.
- When the field mapping is complete, build the project. From the Project menu select Build or click the equivalent tool button. When complete you will get the following message:

- Click Ctrl-S to Save and then Alt-F4 to Exit
- Back in the LANSA Integrator Studio window, expand the ResponseTutordJSON solution, then right-click on the ResponseTutordJSON.json.jar file and select Send To / Integrator Folder from the popup menu.

- Repeat the previous step for the JSONFileBindService.properties file.
- In the LANSA Integrator Studio window,.expand the Servers item near the bottom of the tree and double-click the server definition corresponding to your LANSA Composer server. This will open a view of the server in the right-hand window pane, allowing you to deploy the completed ResponseTutordJSON solution from your PC to the server.
- Expand the Integrator item in the tree on the left-hand side, then expand the bindings folder and locate the ResponseTutordJSON.json.jar file. Right-click the file and select Publish File from the popup menu. Click Yes when prompted to confirm the request.

- Expand the properties folder and locate the JSONBindFileService.properties file. Right-click the file and select Publish Section from the popup menu. Click Yes when prompted to confirm the request.

- Finally, you need to restart LANSA Integrator on your server in order to use the new solution. Before you do so, be sure (especially in a production environment) that no jobs are using the LANSA Composer or LANSA Integrator server. Restarting LANSA Integrator will interrupt running jobs that are using it.
When you are ready to restart LANSA Integrator, select the server Instance in the right-hand pane, right-click and select Shutdown / Reboot from the popup menu. Click Yes when prompted to confirm the request.

- Close LANSA Integrator Studio and continue with the next tutorial.
Now continue with the following tutorial:
JSM026 - Create a JSM Binding Script Configuration that prepares the JSON Response