Ping and Echo -
Technotes
|
 |
To learn more about Java API for XML Web Services (JAX-WS) Web services, see the Web Services documentation in the
WebSphere Application Server Information Center Library.
The JAX-WS Web Services Ping and Echo Sample demonstrates
simple message exchange patterns (MEP) using both a synchronous
and asynchronous programming model. This Sample supports both
SOAP 1.1 and SOAP 1.2 and incorporates Web services standards such
as WS-Addressing (WS-A), WS-Reliable Messaging (WS-RM), and
WS-Secure Conversation (WS-SC). Using this Web Service Sample,
you can perform a broad range of interoperability tests. The
Sample demonstrates the use of static JAX-WS service endpoints,
as well as dispatch and proxy-based clients.
You can find the source code for the Ping and Echo client
Sample in subdirectories of the profile_root
/samples/src/JaxWSServicesSamples directory. The subdirectory,
SampleClientSei/src, contains the source code for
for the following client Samples:
- Ping and Echo application
- Simple servlet client
- Ping and Echo thin client
On z/OS operating systems The source code tree for these JAX-WS Samples is not
provided on the z/OS operating system because the Sample applications are not
built on the z/OS operating system.
The message exchange patterns for the Samples are described
in the following section.
The one-way request
scenario demonstrates a one-way message exchange pattern to send
a ping application message from a client to a service.
The two-way request and
response scenario demonstrates a two-way message exchange pattern
to send an application message from a client to a service and
receives an echo string response from the server on the same
request and response channel.
The two-way
asynchronous request and response scenario demonstrates a two-way
message exchange pattern that sends an echo string message from
a client to a service and expects the echo string response from
the server on the same request and response channel. Although this
message exchange pattern is similar to the Sync Echo Sample, this
Sample implements the JAX-WS asynchronous programming model. In this
scenario, a request is made but the application can continue to do
additional work. When a response is received, a callback handler
routine is used to process the response. Over the wire, this Sample
looks the same as Sync Echo.
The two-way
asynchronous request and response with asynchronous communication
scenario demonstrates a two-way message exchange pattern to send
an echo string message from a client to a service. The client
expects the echo string response from the server on a different
request and response channel. This Sample implements the JAX-WS
asynchronous programming model. In this scenario, a request is
made to the service but the client application can continue to do
additional work. When a response is received, a callback handler
routine is then used to process the response. The client listens
on separate channel to receive the response messages from a
server initiated channel.