Step 5. Map Parameters to Program Variables
INT010A - SOAP Service - Define Server
In this step, you will map the web service Step 4. Create a new SOAP Operation, to the program variable names that you will use in the program that implements this web service.
and you created in1. Map the
parameters:a. Select and right click on the departmentCode to open the context menu.
b. Select
from the context menu to open the dialog box.
c. In the DEPTMENT, and click . Leave Format blank.
dialog box enter the corresponding program variable name, in this caseThe mapped program variable names you entered are shown in brackets after the parameter name. Note that the icon has changed to indicate that this parameter is mapped.
2. Repeat this procedure for the second SECTION.
parameter, sectionCode. Select from the context menu and map to the program variable nameNote how the variable name is shown with the parameter name and that the icon has changed.
3. Map the
or parameter. Because the return parameter is a complex type, the procedure is slightly different:a. Select and right click the Employee parameter to open the context menu.
b. Select
from the context menu. This option allows you to receive all the elements of Employee in a single call.c. In the resulting dialog, EMPLOYEE.
enter the name you wish to give to the Fragment, in this case,
d. Click
to confirm this assignment.
The mapped fragment name is now shown beside the Employee return parameter, and the icon has changed. In this case, the icon has changed for all the elements of employee because when you marked Employee as a fragment, LANSA Integrator assumed that all the elements would be mapped to fields. All that remains to be done is to assign the program variable names to the elements within Employee.
4. Complete the mapping for the outbound elements in Employee:
a. Select and right click the employeeId element to open the context menu.
b. Select
from the context menu.
c. Enter the program variable name, EMPNO, in the dialog box and click .
d. Now you can repeat the procedure for the remaining elements:
element |
program variable |
firstName |
GIVENAME |
salary |
SALARY |
surname |
SURNAME |
The mapping is now complete. Your window should look like the one in the screen capture following.
5. Save your changes.