JAX-WS Web Services |
|
|
![]() |
|
Run | Configure | Technotes | Javadoc | Build with Ant |
Running the Sample |
Running the thin client Sample |
Enabling Reliable Messaging and Security |
The Ping and Echo Samples are two simple JAX-WS Web services.
The Ping Sample demonstrates a one-way operation. A simple string value is passed to the service. The client operation is complete after it has contacted the service. Two endpoints exist in the Sample. One endpoint uses SOAP 1.1 and the other endpoint uses SOAP 1.2.
The Echo Sample demonstrates a two-way operation. A simple string value is passed to the service. The service prepends an identifier string value and returns this value back to the client. There are two endpoints in the Sample. One endpoint uses SOAP 1.1 and the other endpoint uses SOAP 1.2. The Echo Sample also demonstrates the synchronous and asynchronous programming models, as well as synchronous and asynchronous over-the-wire behavior:
URI | Description |
---|---|
http://localhost:9080/WSSampleSei/PingService |
Ping service sample using SOAP 1.1 |
http://localhost:9080/WSSampleSei/PingService12 |
Ping service sample using SOAP 1.2 |
http://localhost:9080/WSSampleSei/EchoService |
Echo service sample using SOAP 1.1 |
http://localhost:9080/WSSampleSei/EchoService12 |
Echo service sample using SOAP 1.2 |
Port 9080 is the default value; however, the port number is different if you install to a profile other than the AppSrv01 profile.
To complete the configuration of the Ping and Echo Sample, deploy the Jax-WS Web Services Sample application on the server. If the sample application is not already deployed, refer to 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 Ping and Echo Sample includes two services, Ping and Echo.
The Ping Sample demonstrates a one-way service transaction. The source for this Sample is located in the profile_root/samples/src/JaxWSServicesSamples/SampleClientSei directory.
The Echo Sample demonstrates a two-way service transaction. The source
for this Sample is located in the
profile_root/samples/src/JaxWSServicesSamples/SampleClientSei
directory.
To run the Ping and Echo client servlet from a
WebSphere Application Server, perform the following steps:
The Ping and Echo thin client Sample is similar to the Ping
and Echo client servlet. This Sample accesses the same Ping and Echo Web
services beans, but it uses a Java archive (JAR) file that requires
the Thin Client for JAX-WS with WebSphere Application JAR file
in the class path.
You can find the WSSampleClientSei.jar file in
the samples/lib/JaxWSServicesSamples
directory.
The Ping and Echo thin client Sample creates a JAX-WS proxy for the Ping or Echo Web service based on the parameters that you provide. The proxy then contacts the service endpoint with the message. The Echo Sample waits for the response.
In the following steps, the variable, app_server_root, refers to the application server installation root.
To run the Ping and Echo thin client from a WebSphere
Application Server, perform the following steps, based on your
operating system:
The following example illustrates a successful run of the Ping
and Echo client on the Windows operating system:
|
To learn more about how the Sample client and application
works, see the Ping and Echo technotes or view the
Java source code.
For more information about Web Services clients, see the documentation on developing and deploying Web Services clients in the WebSphere Application Server Information Center Library.
Policy Set Scripts |
Applying QoS to the Ping and Echo thin client Sample |
Filename | Description |
---|---|
enableRMQoS.bat | Enable WS-ReliableMessaging Version 1.1 |
enableRM1QoS.bat | Enable WS-ReliableMessaging Version 1.0 |
enableSCQoS.bat | Enable WS-SecureConversation |
enableRSPQoS.bat | Enable WS-ReliableMessaging and WS-SecureConversation |
enableWSAQoS.bat | Enable WS-Addressing |
disableRMQoS.bat | Disable WS-ReliableMessaging Version 1.1 |
disableRM1QoS.bat | Disable WS-ReliableMessaging Version 1.0 |
disableSCQoS.bat | Disable WS-SecureConversation |
disableRSPQoS.bat | Disable WS-ReliableMessaging and WS-SecureConversation |
disableWSAQoS.bat | Disable WS-Addressing |
Filename | Description |
---|---|
enableRMQoS.sh | Enable WS-ReliableMessaging Version 1.1 |
enableRM1QoS.sh | Enable WS-ReliableMessaging Version 1.0 |
enableSCQoS.sh | Enable WS-SecureConversation |
enableRSPQoS.sh | Enable WS-ReliableMessaging and WS-SecureConversation |
enableWSAQoS.sh | Enable WS-Addressing |
disableRMQoS.sh | Disable WS-ReliableMessaging Version 1.1 |
disableRM1QoS.sh | Disable WS-ReliableMessaging Version 1.0 |
disableSCQoS.sh | Disable WS-SecureConversation |
disableRSPQoS.sh | Disable WS-ReliableMessaging and WS-SecureConversation |
disableWSAQoS.sh | Disable WS-Addressing |
Filename | Description |
---|---|
enableRMQoS | Enable WS-ReliableMessaging Version 1.1 |
enableRM1QoS | Enable WS-ReliableMessaging Version 1.0 |
enableSCQoS | Enable WS-SecureConversation |
enableRSPQoS | Enable WS-ReliableMessaging and WS-SecureConversation |
enableWSAQoS | Enable WS-Addressing |
disableRMQoS | Disable WS-ReliableMessaging Version 1.1 |
disableRM1QoS | Disable WS-ReliableMessaging Version 1.0 |
disableSCQoS | Disable WS-SecureConversation |
disableRSPQoS | Disable WS-ReliableMessaging and WS-SecureConversation |
disableWSAQoS | Disable WS-Addressing |
Use the following steps to run the reliable messaging scripts on the Windows operating system. You can run the all of the scripts in a similar manner based on your operating system.
The following example demonstrates how to run the Enable
WS-ReliableMessaging script with the optional profile, cell,
and node parameters specified:
The following example demonstrates how to run the Disable WS-ReliableMessaging
script with the optional profile, cell, and node parameters
specified:
The profile_root indicates the server
directory where your profile is located, for example:
Note: The period (.) is included at the end of the class path statement. The period is included so the policy set loading code finds the META-INF directory. Do not omit the period.