Web Services Sample

The WebSphere Application Server Liberty Profile jaxws-2.2 feature, included in the extended content for the Liberty Profile, supports the Java API for XML-Based Web Services. With this feature, it is easy to develop web services applications on the Liberty profile.

This sample contains a server definition that includes the jaxws-2.2 feature. It also contains a demo application JaxWsSample.war, which demonstrates a number of JAX-WS features supported by the Liberty profile.

This sample can be installed onto runtime versions 8.5.5.0 and later.

Installation Instructions

Online installation (requires 8.5.5.6 or later):

  1. Install the sample by running the command below from the bin directory of your server installation:
    installUtility install JAXWSWebSample

Any missing features required by the server will be installed for you.

Offline installation:

  1. Download the JAXWSWebSample.jar using the download button at the top of the page and place it in the root of your server installation.
  2. Extract the sample into the Liberty installation by running the command below from the root of your server installation:
    java -jar JAXWSWebSample.jar

Any missing features required by the server will need to be installed separately.

Running The Application

To run the JAXWSWebSample application:

  1. Start the JAXWSWebSample server by running the command below from the bin directory in the Liberty profile installation:
    server run JAXWSWebSample
  2. Confirm the application started by looking for the following message in the log:
    CWWKZ0001I: Application JAXWSWebSample started in XX.XX seconds.
  3. In your browser, enter the URL for the application: http://localhost:9131/JAXWSWebSample/ (where port 9131 assumes the httpEndpoint provided in the sample server.xml has not been modified).
  4. There are 7 scenarios for different JAX-WS features in the left. You can navigate each scenario to experience these features.

Notes

This sample requires a Liberty Profile installation that includes the jaxws-2.2 feature. The jaxws-2.2 feature is available as part of the Liberty Profile extended content.

The JAXWSWebSample.war file contains the source and binaries for the application, and can be used to import it to Eclipse.

Sample Structure

  • wlp
    • usr
      • servers
        • JAXWSWebSample
          • Copyright.txt
          • apps
            • JAXWSWebSample.war
          • readme.html
          • server.xml