You can use the JaxWSServicesSamples
sample application to demonstrate
JAX-WS web services. The samples show the basic implementation of one-way and two-way web services.
Before you begin
These samples were tested with WebSphere®
Application Server Version 8.0 and Version 8.5.
About this task
Each sample includes a servlet that exercises the service by using a browser. Also included is a
sample that uses the Thin Client for JAX-WS with WebSphere Application Server, which you can run from a command line.
Procedure
-
Download the JaxWSServicesSamples-8.5.zip file to a directory on your workstation.
You might create the
/samples/JaxWSServicesSamples directory path on your
workstation and download JAX-WS web services sample files to that directory path.
The
JaxWSServicesSamples.zip file contains sample files in the following directory
structure.
/images
/installableApps
/javadoc
/META-INF
/scripts
/src
/style
build.xml
readme.html
Attention: The readme.html
file contains
information for installing and running the sample.
- Extract the installableApps/JaxWSServicesSamples.ear from the
JaxWSServicesSamples-8_5.zip directory.
The following samples are included.
- Ping and Echo
- The Ping and Echo sample illustrates simple JAX-WS services. The Ping sample demonstrates a
one-way service transaction. A simple text string is sent from the service client to the service
endpoint. The Echo sample demonstrates a two-way service transaction. A simple text string is sent
from the service client to the service endpoint. The service adds an identifier and returns the
string to the client. The Echo sample also demonstrates the use of the synchronous programming model
and also the use of two modes of the asynchronous programming model.
- MTOM
- The MTOM sample illustrates the use of the SOAP message Transmission Optimization Mechanism
(MTOM) on the transport to send and receive binary files. The MTOM feature optimizes the format of
how the SOAP message looks on the wire by selectively encoding portions of the message, while still
presenting an XML Infoset to the SOAP application. A file is sent from the service client to the
service endpoint with the binary data encoded using MTOM.
What to do next
For more information about installing the sample, see the readme.html
file
and the Installing the JAX-WS Web Services samples with the console topic in the v855
documentation.