These samples demonstrate JAX-WS web services. The samples
show the basic implementation of one-way and two-way web services.
Included in each sample is a servlet that exercises the service using
a browser, and a sample using the Thin Client for JAX-WS with WebSphere® Application Server
that you can run from a command line.
Time required to set up and configure these samples
15
minutes
Prerequisites for use
WebSphere Application Server V8.0
Important: These samples were tested with WebSphere Application Server Version 8.0.
Samples download
To use the samples, download
JAX-WS sample files from a product download site:
- Choose one of the following methods to download the JaxWSServicesSamples.zip file
to a directory on your workstation: FTP or HTTP. You might create the /samples/JaxWSServicesSamples directory
path on your workstation and download JAX-WS web services sample files
to that directory path.
- From the displayed dialog, specify the target directory to which
to save the compressed file and click OK.
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.
Samples description
- 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 prepends 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 enables SOAP bindings to optimize the
transmission or 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.