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
-
Start WebLogic Server in the appropriate domain.
-
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.
-
When prompted to accept the digital certificate, click Yes.
-
When prompted for a username and password, enter:
-
username: weblogic
-
password: weblogic
-
Navigate to the Test Form tab of Test View, if necessary.
-
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.
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().
-
Click Refresh, until the Message Log displays the
callback callback.onCheckDone.
-
Select log entries in the Message Log to see the message traffic involved
in each interaction.