endpoint = new java.net.URL(opts.getURL());
} catch (java.net.MalformedURLException e) {
throw new javax.xml.rpc.ServiceException(e);
}
PingPort port = (PingPort) service.getSTPing4(endpoint);
/*
* At this point all preparations are done. Using the port we can
* now perform as many calls as necessary.
*/
// perform call
StringHolder text =
new StringHolder("WSS4J - ST Scenario 4 text");
port.ping(new org.apache.ws.axis.oasis.ping.TicketType("WSS4J"), text);
System.out.println(text.value);
if (opts.isFlagSet('t') > 0) {
long startTime = System.currentTimeMillis();
for (int i = 0; i < 20; i++) {
port.ping(new org.apache.ws.axis.oasis.ping.TicketType("WSS4J"), text);
}
long endTime = System.currentTimeMillis();
System.out.println("Time used: " + (endTime - startTime) + "ms");