In this step, you will use the XML Binding Wizard to create the outbound response binding iiiPRO05_response.jar. This jar file will bind the outbound XML from the Server to send to the client. You will define the mappings from your LANSA fields into the XML response document.
- From the Project tab select the XML List Response solution group, right click and select New Solution, a dialog will appear.
- Select the XML Binding Wizard in the Tool dropdown.
- XML List Response will already be selected in the Group dropdown.
- Type iiiPRO05_response in the Solution File input field. Click OK.
- A new XML Binding Project dialog appears. To select the source XML file, click on the Browse button. A File Open dialog will be displayed.
- Select the iiiPRO05_response.xml file and click Open to select it. Click OK and the XML Binding Wizard main window will now appear. Change Package name to com.iiicompany.service.xml
- Check the Outbound checkbox. An Outbound tab will now appear at the bottom of the window.
- The outbound mapping is nearly identical to the inbound mapping. The only difference is the naming of the root tag, and the addition of a description node within the list.
- Select the Outbound tab.
- Right click on the DepartmentListResponse root tag. Select Fragment from the pop-up menu.
- Right click on ReverseString tag and select Edit from the pop-up menu (or double click on it).
- In the Field Attributes dialog, type in STD_TEXTS for the Name and click OK.
- Right click on either of the Department tags and select List.
- Expand the Department tags to see their sub-tags. Right click or double click on either of the Code tags to edit them.
- In the Field Attributes dialog, type in DEPTMENT for the Name and click OK.
- Right click or double click on either of the Description tags to edit them.
- In the Field Attributes dialog, type in DEPTDESC for the Name and click OK
Your XML outbound binding should look like the following:
- Your XML mappings are complete. Now, generate and compile the outbound response service. Select the Project menu and choose the Build option.
- Using the File menu, select the Save option. Click on Yes to save the project.
- Exit the XML Binding Wizard.