CreditReport.jws Sample

Similar to the Investigate web service developed during Tutorial: Your First Web Service, but more fully developed. Demonstrates use of conversations and Web Service controls.

Concepts Demonstrated by this Sample

Location of Sample Files

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

BEA_HOME\weblogic81\samples\workshop\SamplesApp\WebServices\creditReport\CreditReport.jws

To Run the Sample

  1. Start WebLogic Server in the appropriate domain.
  2. Launch the service either by opening it in WebLogic Workshop and selecting the Start operation or by entering http://localhost:7001/WebServices/creditReport/CreditReport.jws in the address bar of your browser. If WebLogic Server is running in the appropriate domain on this machine and you have deployed the SamplesApp sample application, you may click here to run the sample.
  3. Navigate to the Test Form tab of Test View, if necessary.
  4. Enter any numeric value for ssn and invoke the requestReport method.
  5. If you click Refresh, log entries for calls to the two external services will appear, to bank.startCustomerAnalysis and irs.requestTaxReport.
  6. After 10 seconds, bank will report back by sending the onDeliverAnalysis callback. The partial results will be forwarded to the client with an invocation of CreditReport's onProgressNotify callback. You must continually click Refresh to see method invocations on controls and callbacks because there is no way to push these events to a browser.
  7. At any time, you may navigate to the continue methods for CreditReport by clicking on the conversation ID in the Message Log.
  8. After 20 seconds, the irs Web Service control will respond. Another onProgressNotify callback is sent to the client, then finally a onReportDone callback ends the conversation.
  9. At any time before the conversation ends you may invoke getCurrentStatus.
  10. At any time before the conversation ends you may invoke cancelReport, which will in turn invoke cancel methods on the external services if they are still pending.
  11. Select log entries in the log to see the message traffic involved in each interaction.

Related Topics

Using WebLogic Built-In Controls

Timer Control

Web Service Control

Designing Conversational Web Services

Using Polling as an Alternative to Callbacks

JwsContext Interface