SOAPing uses the SOAP protocol to elicit a small and simple response from a Web service host. An echo-Web service is required at server side. SOAPings have a typical structure defined by W3C's SOAP recommendation. They consist of a an arbitrary number of "pad" bytes used to fill out the packet.
The server must be capable of receiving and sending SOAP messages. This can be accomplished by use of a SOAP implementation such as Apache AXIS.
The client uses the APIs JAX-RPC and DOM.
In essence the following JAR archives are required.
These files can be obtained also as part of Apache's AXIS distribution
The server side service should be as simple as:
public class Ping {
public String ping(String packet) {
return(packet);
}
}
Note: This service can be implemented using arbitrary programming languages.
Issuing java SOAPing
at the command line interface produces some information on the available parameters and switches.Usage: java SOAPing [-dnrtvVC] [-c count] [-i interval] [-l preload] [-s packetSize] [-p pattern] [-f #Threads] [-w deadline] [-a actionURI] [-x XML Output File] [-ttl timeout] [-o XML Statistics File] [-oc Comment] [-ns namespace] URI
.
Options:
o
.URI
is the SOAP endpoint the call should be directed to.
Invocation
java SOAPing http://www.example.org:8080/axis/Ping.jws
Output
PING http://www.example.org:8080/axis/Ping.jws from 10.0.0.1: 64 bytes of data.
(Thread-1) 64 bytes from http://www.example.org:8080/axis/Ping.jws: time=331 msec
--- http://www.example.org:8080/axis/Ping.jws ping statistics ---
1 packets transmitted, 1 received, 0% loss, time 331 ms
rtt min/avg/max/mdev = 331/331.0/331/0.0 ms
calls/sec. 3.021148
Invocation
java SOAPing -n -t -v -C -c 5 -i 1 -l 2 -s 100 -p 42 -f 2 http://www.example.com:8080/axis/Ping.jws
Output
pattern=42
creating 2 threads ...
using default timeout null
using default timeout null
... finished
sending 2 packets preload ...
using default timeout null
received packet in sync with sent one
(preload-Thread) 100 bytes from http://www.example.com:8080/axis/Ping.jws: time=290 msec (Wed Apr 07 15:54:14 CEST 2004) (1/2)
received packet in sync with sent one
(preload-Thread) 100 bytes from http://www.example.com:8080/axis/Ping.jws: time=60 msec (Wed Apr 07 15:54:14 CEST 2004) (2/2)
... done
PING http://www.example.com:8080/axis/Ping.jws from 10.0.0.1: 100 bytes of data.
all threads running now
received packet in sync with sent one
(Thread-1) 100 bytes from http://www.example.com:8080/axis/Ping.jws: time=110 msec (Wed Apr 07 15:54:14 CEST 2004) (1/5)
received packet in sync with sent one
(Thread-2) 100 bytes from http://www.example.com:8080/axis/Ping.jws: time=130 msec (Wed Apr 07 15:54:14 CEST 2004) (1/5)
received packet in sync with sent one
(Thread-1) 100 bytes from http://www.example.com:8080/axis/Ping.jws: time=70 msec (Wed Apr 07 15:54:14 CEST 2004) (2/5)
received packet in sync with sent one
(Thread-1) 100 bytes from http://www.example.com:8080/axis/Ping.jws: time=111 msec (Wed Apr 07 15:54:14 CEST 2004) (3/5)
received packet in sync with sent one
(Thread-2) 100 bytes from http://www.example.com:8080/axis/Ping.jws: time=141 msec (Wed Apr 07 15:54:14 CEST 2004) (2/5)
received packet in sync with sent one
(Thread-1) 100 bytes from http://www.example.com:8080/axis/Ping.jws: time=80 msec (Wed Apr 07 15:54:14 CEST 2004) (4/5)
received packet in sync with sent one
(Thread-2) 100 bytes from http://www.example.com:8080/axis/Ping.jws: time=130 msec (Wed Apr 07 15:54:14 CEST 2004) (3/5)
received packet in sync with sent one
(Thread-1) 100 bytes from http://www.example.com:8080/axis/Ping.jws: time=50 msec (Wed Apr 07 15:54:14 CEST 2004) (5/5)
received packet in sync with sent one
(Thread-2) 100 bytes from http://www.example.com:8080/axis/Ping.jws: time=50 msec (Wed Apr 07 15:54:14 CEST 2004) (4/5)
received packet in sync with sent one
(Thread-2) 100 bytes from http://www.example.com:8080/axis/Ping.jws: time=50 msec (Wed Apr 07 15:54:14 CEST 2004) (5/5)
collected 10 values
--- http://www.example.com:8080/axis/Ping.jws ping statistics ---
10 packets transmitted, 10 received, 0% loss, time 922 ms
rtt min/avg/max/mdev = 50/184.4/141/98.43272 ms
calls/sec. 2.7173913
The implementation is released unter the Lesser GNU Public License.
Service provided by Mario Jeckle
Generated: 2004-06-08T12:46:20+01:00
Feedback SiteMap
This page's original location: http://www.jeckle.de/freeStuff/soaping/index.html
RDF description for this page