Getting Started Samples: Web Services

This sample demonstrates a basic application that shows a basic web services that receives a message and returns a response, both in a synchronous and asynchronous manner. Instead of running this finished sample, you can create this application by running the tutorial Getting Started: Web Services.

The sample application allows a name to be passed to a web service which returns a greeting. Both a synchronous and asynchronous approach is implemented. The application contains the following component:

Concepts Demonstrated by this Sample

Location of Sample Files

This sample is located at:

BEA_HOME\weblogic81\samples\platform\GettingStarted_WebServices_Sample\GettingStarted_WebServices_Sample.work

To Run the Sample

  1. Start WebLogic Server in the workshop domain.
  2. Open GettingStarted_WebServices_Sample\hello\Hello.jws and click the Start button.
  3. Enter your name in the Name field and click the hello_synch button.
  4. Notice that the method returns the response Hello, <your name>!
  5. When the Workshop Test Browser launches, in the Name field, enter [your_name] and click hello_asynch.
  6. Notice that the method returns immediately. Scroll down to the Service Response section and notice that the method did not return anything. Also notice that the conversation has started.
  7. Click the Continue this conversation link. Notice in the Message Log that the the hello_callback method has been invoked and that the conversation is finished. Also notice that no greeting is returned; instead the callback method sends the greeting as a parameter to the invoking client.
  8. Return to WebLogic Workshop and press the Stop button to close the Test Browser.

Related Topics

Tutorial: Web Services