VeriCheck.jws Sample

The VeriCheck web service demonstrates asynchronous communication between two web servers both of which are secured with SSL and role-based security.

Concepts Demonstrated by this Sample

Location of Sample Files

This sample is located in the security/roleBased folder of the WebServices project in the SamplesApp sample application. In the file system the location is:

BEA_HOME\weblogic81\samples\workshop\SamplesApp\WebServices\security\roleBased\VeriCheck.jws

To Run the Web Service

  1. Start WebLogic Server in the appropriate domain.
    • On Microsoft Windows systems, from the Start menu, choose BEA WebLogic Platform 8.1-->Examples-->WebLogic Workshop Examples-->Start Workshop with Sample Applications.
    • On Linux or Solaris systems, run:

      BEA_HOME/weblogic81/samples/domains/workshop/startWebLogic.sh

  2. Launch the service by entering https://localhost:7002/WebServices/security/roleBased/VeriCheck.jws?.EXPLORE=.TEST in the address bar of a web browser. If WebLogic Server is running in the samples domain on your machine, you may click here to run the sample.
  3. When prompted to accept the digital certificate, click Yes.
  4. When prompted for a username and password, enter:
  5. Navigate to the Test Form tab of Test View, if necessary.
  6. Enter values for checkingAccountID and amount in the checkForSufficientBalance method. The checkingAccountID parameter can be any string value, the checkForSufficientBalance parameter must be an integer value. Invoke the method by clicking the button labeled checkForSufficientBalance.

  7. The VeriCheck web service sends the checking account and amount parameters to the Bank web service. The Bank web service checks to see if the checking account has sufficient funds to cover the amount specified. Once the Bank web service has completed its task, it calls back the VeriCheck web service informing VeriCheck whether the account has sufficient funds. The VeriCheck web service then calls back the original client informing the client whether the account has sufficient funds.

    Both the VeriCheck and Bank web services require basic authentication. When the VeriCheck service invokes the Bank service's doesAccountHaveSufficientBalance method, it sends authentication information via the method calls setUsername() and setPassword().

    Similarly, when the Bank callsback the VeriCheck service, it sends authentication information via the method calls setCallbackUsername() and setCallbackPassword().
  8. Click Refresh, until the Message Log displays the callback callback.onCheckDone.
  9. Select log entries in the Message Log to see the message traffic involved in each interaction.

Related Topics

HelloWorldSecureClient.jws Sample

WebLogic Workshop Security Overview