Step 5 Map Parameters to Program Variables

LANSA Integrator

Step 5. Map Parameters to Program Variables

INT010A - SOAP Service - Define Server

In this step, you will map the web service Inbound and Outbound Parameters you created in Step 4. Create a new SOAP Operation, to the program variable names that you will use in the program that implements this web service.

1.  Map the Inbound parameters:

a.  Select and right click on the departmentCode to open the context menu.

b.  Select Field from the context menu to open the Field Attributes dialog box.

c.  In the Field Attributes dialog box enter the corresponding program variable name, in this case DEPTMENT, and click OK. Leave Format blank.

     The 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 Inbound parameter, sectionCode. Select Field from the context menu and map to the program variable name SECTION.

     Note how the variable name is shown with the parameter name and that the icon has changed.

3.  Map the Return or Outbound 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 Fragment from the context menu. This option allows you to receive all the elements of Employee in a single call.

c.  In the resulting dialog, Fragment Attributes, enter the name you wish to give to the Fragment, in this case, EMPLOYEE.

d.  Click OK 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 Edit from the context menu.

c.  Enter the program variable name, EMPNO, in the Field Attributes dialog box and click OK.

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.