Testing the Application

The WelcomeUsers service can now be invoked (using the WelcomeUsersService.wsdl file) from another process or SOA application running in the BPM runtime, or from an external application.

Note: All access to the BPM runtime must be by an authenticated user. Any unauthenticated request will be rejected.

An external application must therefore pass the security credentials - encoded username and password - of an authenticated BPM runtime user in every message it sends to the BPM runtime.

The encoded username and password (compliant with the Web Services Security UsernameToken Profile) must be included in a standard SOAP or HTTPS security header via HTTPS communications.

For demonstration purposes, this tutorial uses the open source tool soapUI to generate and run a simple external application that can call the WelcomeUsers service. You can, if you prefer, use any other tool that allows you to generate and send a SOAP request from a WSDL file.

Procedure

  1. If you do not already have soapUI on your system, download it from http://www.soapui.org.
  2. Edit the soap:address location element in the WelcomeUsersService.wsdl file as follows:
    1. Save the file.
  3. Start soapUI.
  4. Create a new WSDL project that uses WelcomeUsersService.wsdl.
  5. Select the Create Requests checkbox to create sample requests for all operations.
  6. Right-click on the project name and select Show Project View.
  7. In the Project View dialog, select the Security Configurations tab.
  8. Click the icon to create an outgoing WS-Security Configuration for the project, specifying the name and password of an authenticated BPM runtime user.
    For example:

  9. Close the Project View dialog.
  10. Expand the project until you reach the Request 1 request on the StartEvent operation.
  11. Press ENTER to open the Request Editor. The SOAP request is displayed in the left-hand pane.
  12. Replace the default ? value in the parameter string:
          <_yit:WelcomeUsersService_UserName>?</_yit:WelcomeUsersService_UserName>

    with the value George - this is the user name you will pass to the WelcomeUsers service.

          <_yit:WelcomeUsersService_UserName>George</_yit:WelcomeUsersService_UserName>
  13. Click the Aut button (Authentication and Security-related settings) and select the outgoing WS-Security Configuration you defined earlier as the Outgoing WSS. For example:

    Click to submit the request to the BPM runtime. The following response is displayed in the right-hand pane:

          Hello George.

    This shows that the WelcomeUsers service has been invoked. The application has received the incoming string George, run the Generate greeting script and returned the customized greeting to the soapUI client.