Step 4. Create iiiFN05 Server outbound (response) binding

INT006 - Department List Inquiry

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.

1.  From the Project tab select the XML List Response solution group, right click and select New Solution, a dialog will appear.

a.  Select the XML Binding Wizard in the Tool dropdown.

b.  XML List Response will already be selected in the Group dropdown.

c.  Type iiiPRO05_response in the Solution File input field. Click OK.

2.  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.

3.  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

4.  Check the Outbound checkbox. An Outbound tab will now appear at the bottom of the window.

5.  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.

a.  Select the Outbound tab.

b.  Right click on the DepartmentListResponse root tag. Select Fragment from the pop-up menu.

c.  Right click on ReverseString tag and select Edit from the pop-up menu (or double click on it).

d.  In the Field Attributes dialog, type in STD_TEXTS for the Name and click OK.

e.  Right click on either of the Department tags and select List.

f.  Expand the Department tags to see their sub-tags. Right click or double click on either of the Code tags to edit them.

g.  In the Field Attributes dialog, type in DEPTMENT for the Name and click OK.

h.  Right click or double click on either of the Description tags to edit them.

i.  In the Field Attributes dialog, type in DEPTDESC for the Name and click OK.

     Your XML outbound binding should look like the following:

6.  Your XML mappings are complete. Now, generate and compile the outbound response service. Select the Project menu and choose the Build option.

7.  Using the File menu, select the Save option. Click on Yes to save the project.

8.  Exit the XML Binding Wizard.