Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

1.      The first steps are to ready the program for calling the Web Service by opening a Java Service Manager connection and loading the SOAPAgent service. The EMPLOYEEAGENT SOAP Agent solution that you have built in this exercise, is then loaded.

Image Added

2.      The next step calls the GetEmployees operation of the web service. The two SET PARAMETER commands "bind" the program variables to the parameters for the operation. At this point, the user must have input these values. In your form example, the user enters the field value(s) and clicks the Get Employees button, which executes this event routine.

         The LANSA Integrator Java Services Manager has access to the variables in the LANSA program by means of the SERVICE_EXCHANGE(*FIELD) keyword. It then knows which program field to map to each parameter by means of the mappings that you specified earlier in the SOAP Wizard.

Image Added

3.      In the third step, the program calls the web service operation, waits for the response and checks for a null response.

Image Added

4.      The fourth step in the generated code is incomplete. Here you will add the business logic. At the moment the program loops, retrieving the RESPONSE fragment until the status (JSMXSTS) is NOFRAGMENT.

Image Added

5.      Finally, the logic that will form your click event cleans up by closing the EmployeeAgent solution, unloading the SOAP Agent service and closing the connection to the JSM server.

Image Added