String endpointAddress = "http://localhost:9191/HelloWorld";
// Add a port to the Service
service.addPort(PORT_NAME, SOAPBinding.SOAP11HTTP_BINDING, endpointAddress);
HelloWorld hw = service.getPort(HelloWorld.class);
String[] names = new String[] {"Anne", "Bill", "Chris", "Daisy"};
// make a sequence of 4 invocations
for (int i = 0; i < 4; i++) {
System.out.println("Calling HelloWorld service");
System.out.println(hw.sayHi(names[i]));
}
// allow aynchronous resends to occur
Thread.sleep(60 * 1000);
bus.shutdown(true);