Step 6. Code iiiFN05 Server GET functionality

INT006 - Department List Inquiry

In this step, you will begin to write the RDMLX for the Server side GET. The client will have sent a request with a list of Department Codes to the server. The server function will receive the XML form and map the data into program variables.

1.  Create a new LANSA process named iiiPRO05 JSM XML List Tutorial, where iii is your unique 3 characters. (If the process already exists, select a different set of characters for iii.).

2.  Create a new function named iiiFN05 Department List Server, belonging to process iiiPRO05. The function must be RDMLX enabled. Create it without using a template.

3.  With your project iii Training open in Studio, expand the Solutions / XML List Request / Samples / RDMLX folder and double click on SAMPLE_RDMLX_INBOUND_HTTP.TXT to open it in the text editor. Copy the code into your function iiiFN05, replacing existing code.

4.  Edit the RDMLX code of function iiiFN05.

a.  Change the GROUP_BY name DEPARTMENTLISTREQUEST to LISTREQ. This Group_By is simply a reference for mapping the field STD_TEXTS.

b.  Use the Replace function to change all occurrences of #DEPARTMENT to #DEPTMEN_W. Use Match whole words only. This is the name of a working list for the received list of department codes. The code generator is currently not respecting RDML name length limits. This should change 2 occurrences.

5.  Save this function. It is not yet complete. It will be finished in the next step.

     At this stage, the server function now has the information from the XML document.