JAX-WS Web Services |
|
|
![]() |
|
Run | Configure | Technotes | Javadoc | Build with Ant |
Configuring the Sample |
Running the Sample |
There are two Message Transmission Optomization Mechanism (MTOM) service clients, a command-line version that uses the Java archive (JAR) file for the Thin Client for JAX-WS with WebSphere Application Server, and a servlet version that uses a JavaServer pages (JSP) to access the MTOM service.
URI | Description |
---|---|
http://localhost:9080/WSSampleMTOM/MtomSampleService |
MTOM service Sample using SOAP 1.1 |
http://localhost:9080/WSSampleMTOM/MtomSampleService12 |
MTOM service Sample using SOAP 1.2 |
Port 9080 is the default value, but the port number is different if you install to a profile other than the AppSrv01 profile.
To complete the configuration of this Sample, deploy the JAX-WS Web services Sample application on the server. If the sample application is not already deployed, see the instructions for Rebuilding and deploying the JaxWSServicesSamples.ear file.
Before you begin, you must verify that the application server is running before running the clients.
The MTOM service Sample consists of two clients and a single enterprise bean deployed on the server. One client is a command-line version that uses the Thin Client for JAX-WS with WebSphere Application Server JAR file. The other client is a servlet version that uses a JSP file to access the MTOM service.
Running the MTOM service servlet |
Running the MTOM service thin client application |
The MTOM service clients send a file encoded with MTOM to the specified service endpoint. By default, the host is set to local host, but you can change this value. A file name is required and there is no default provided. In this Sample, the service receives the file sent from the client, and then the file is returned to the client in the dispatch or proxy programming model as specified.
The MTOM service servlet client is not container managed.
For more information about invoking a servlet client in a Thin Client for JAX-WS environment, see the documentation on running an unmanaged Web services JAX-WS client in the WebSphere Application Server Information Center Library.
To run the simple MTOM servlet service client from WebSphere
Application Server, perform the following steps:
The WSSampleMTOMClient.jar file is a command-line version of the MTOM service thin client application.
In the following steps, the variable, app_server_root, refers to the application server installation root directory.
To run the MTOM service thin Client application from
WebSphere Application Server, perform the following steps, based
on your operating system:
The following example illustrates a successful run of the MTOM service thin client application on the Windows operating system:
runSampleMtom.bat -i c:\SYSLEVEL.IBM -p 9081 |
To learn more about how the client and the application works, see the MTOM service technotes or view the Java source code.