A web service that demonstrates use of the @jws:conversation
tag to control the lifecycle of a conversational instance of the web service
and provide data persistence.
Conversation.jws implements a synchronous polling interface for the
asynchronous HelloWorldAsync web service. A polling interface is necessary if
you wish to serve clients that cannot accept asynchronous callbacks due to
security arrangements such as firewalls.
Conversations also provide correlation, whereby requests from multiple
simultaneous clients are tracked and responses are directed to the right
client.
Concepts Demonstrated by this Sample
-
Start WebLogic Server in the appropriate domain.
-
Launch the service either by opening it in WebLogic Workshop and selecting
the Start operation or by entering
http://localhost:7001/WebServices/async/Conversation.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.
-
Navigate to the Test Form tab of Test View, if necessary.
-
Invoke the startRequest method to create a
new conversational instance and invoke the operation on the simulated
legacy system.
-
Click on the conversation ID (the large number at the top of each section
in the Message Log) to access that conversation's continue and finish
methods.
-
Notice the call from Conversation.jws to helloAsync.HelloAsync.
helloAsync is an instance of a Web Service
control and HelloAsync is one of its
methods.
-
Invoke the getRequestStatus method to see
if the request is complete. If you do this before the helloAsync_onHelloResult
callback arrives from the Service control, you will get a response telling
you the back end system hasn't yet replied.
-
If you invoke getRequestStatus after the helloAsync_onHelloResult
callback has arrives, getRequestStatus
will return the result.
-
Click on the conversation ID again to access the conversation's continue
and finish methods.
-
Invoke terminateRequest to finish the
conversation. This releases the resources associated with this
conversational instance of the web service.
-
Select log entries in the Message Log to see the message traffic involved
in each interaction.