In this tutorial, you will create the JSM Binding Script Configuration that uses the LANSA Integrator SOAP Agent solution that you created in the previous tutorial.

  1. Open LANSA Composer and complete the connection to your LANSA Composer server.  Select JSM binding scripts in the Navigator at the left.  Then click the New tool button to create a new JSM Binding Script Configuration.  Complete the details of the new configuration as shown and then click the Save button (or press Ctrl+S).
  2. Click the Script tab to edit the JSM binding script.  Then click the Insert button (or use the context menu) and select Receive binding field values from processing sequence variables from the menu.  In the Details area at the bottom, click the Edit Bindings button, and then complete the bindings as shown and click OK:
  3. Click the Insert button (or use the context menu) and select JSM command from the menu.  If necessary, click the Move Down button (or use the Ctrl+Down Arrow shortcut) so that the JSM command directive is after the Receive binding field values directive.  Repeat the insertion seven times, so that you have eight empty JSM command directives.
  4. Select each of the JSM command directives in turn, and in the Details area at the bottom, type (or copy and paste) the next JSM command from the list below:

    SERVICE_LOAD SERVICE(SOAPAgentService
    OPEN SERVICE(CurrencyExchangeRate)
    SET OPERATION(ConversionRate)
    SET PARAMETER(FromCurrency)
    SET PARAMETER(ToCurrency)
    CALL URL(http://www.webservicex.net/CurrencyConvertor.asmx)
    CLOSE
    SERVICE_UNLOAD


  5. Select each of the two SET PARAMETER(…) commands in turn, and in the Details area at the bottom, click (check) the Exchange fields checkbox.
  6. Similarly, select the CALL URL(…) command, and click (check) the Exchange fields checkbox in the Details area.
  7. Click the Insert button (or use the context menu) and select Write binding field values to process sequence variables from the menu.  If necessary, use the Move down button (or use the Ctrl+Down Arrow shortcut) until the new directive is at the bottom of the script.  In the Details area at the bottom, click the Edit Bindings button, and then complete the bindings as shown:
  8. If you wish, you can use the Insert button or the context menu to insert some comment lines describing what the script is doing.  When complete, your script should look similar to this:


    When you look at your JSM binding script (as shown above) you should see asterisks on the lines containing each of the two SET PARAMETER(…) commands and the line containing the CALL URL(…) command.  That is, on three lines in total.  The asterisk indicates that the Exchange fields checkbox is checked for that line.  If you do not see that, then go back and check that you have completed steps 5 and 6 above.

  9. Click the Save button (or press Ctrl+S) to save your changes.

Now continue with the following step:

JSM013 - Create a Processing Sequence to use the JSM Binding Script Configuration

  • No labels