Step 2 Create XML iiiPRO05_response xml

LANSA Integrator

Step 2. Create XML iiiPRO05_response.xml

INT007 - Department List Inquiry

In this step, you will write the XML to SEND (server) and RECEIVE (client) the response with the department descriptions. The client function only requires a response consisting of a list of department descriptions; however, the department code and the department description will also be sent back in order to make the RDMLX code smaller and simpler. The structure of the response XML is the same as the request XML.

1.  In Studio, select Solutions in your project tab and use New Solution Group to create a folder XML List Response.

2.  Working with your opened iiiPRO05_request.xml, modify the root tag to define the response XML. Call the root DepartmentListResponse. Remember to modify the closing tag as well.

     Your XML might appear as follows:

<?xml version="1.0" encoding="UTF-8"?>

<DepartmentListResponse>

     <ReverseString>ABCDEFG</ReverseString>

     <Department>

        <Code>ADM</Code>

      </Department>

      <Department>

        <Code>FLT</Code>

      </Department>

</DepartmentListResponse>

 

3.  Modify your XML so that the department description is also exchanged. Insert a department description tag within the <Department> tag. Call the tag <Description>.

     Your XML might appear as follows:

<?xml version="1.0" encoding="UTF-8"?>

<DepartmentListResponse>

   <ReverseString>ABCDEFG</ReverseString>

   <Department>

       <Code>ADM</Code>

       <Description>Administration Dept</Description>

    </Department>

    <Department>

      <Code>FLT</Code>

       <Description>Fleet Administration</Description>

     </Department>

</DepartmentListResponse>

 

4.  Using the File menu, select the Save As option as specify the file as iiiPRO05_response.xml. Save it to the folder XML List Response.