Step 2 Define custom SOAP Server Types

LANSA Integrator

Step 2. Define custom SOAP Server Types

INT010A - SOAP Service - Define Server

SOAP Server Types are user-defined data types used in a SOAP server to define request and response parameters. They can consist of one or more elements, each of which may be of a simple type such as strings or numbers.

Defining them using LANSA Integrator Studio makes them independent of the web services that uses them.

In this step you will define the Solution Employee server type for GetEmployees.

GetEmployees will return these four elements:

  • employee id
  • first name
  • surname
  • salary.

1.  Select the tab for your Project in the LANSA Integrator Studio.

2.  Select Solutions and right mouse click to open the context menu.

3.  Select the SOAP Server types option from the menu.

     This will open the LANSA Integrator SOAP Type Editor.

4.  Right click in the empty space to open the context menu and then select New Type.

     The LANSA Integrator SOAP Type Editor dialog is displayed.

5.  Enter the name for the new type in the LANSA Integrator SOAP Type Editor dialog box and click OK (or press the Enter key).

6.  Now you must define the elements that make up the Employee Type.

     To define an element:

a.  Right click on Employee to open the context menu.

b.  Select New Element from the context menu.

     The Element dialog box is opened.

 

7.  Enter employeeId as the Element Name of the first Element. Note the case of this entry. The first character is lower case. The first character of other words (in this case Id) is upper case.

     Select the Value String from the drop down list.

8.  Press OK.

     The dialog remains open ready for you to enter any further elements.

9.  Enter the second element in the same way as for employeeId:

     That is, firstName with a Value of String.

10.Create the third element, the salary element.

     The Value for salary is the appropriate numeric type which is double.

11. Create the final element, surname with a Value of String.

12.When you have finished adding elements, close the Element dialog box by clicking the Cancel button.

     You have created the SOAP Server Types necessary to support your web service.

13.Save the changes using either the Save button, the Ctrl + S keys or Save from the File menu.

14.Close the LANSA Integrator SOAP Type Editor using Exit from the File menu or the Alt + F4 keys.