URL busFile = Client.class.getResource("ws_rm.xml");
Bus bus = bf.createBus(busFile.toString());
BusFactory.setDefaultBus(bus);
bus.getOutInterceptors().add(new MessageLossSimulator());
GreeterService service;
if (args.length != 0 && args[0].length() != 0) {
File wsdlFile = new File(args[0]);
URL wsdlURL;
if (wsdlFile.exists()) {
wsdlURL = wsdlFile.toURL();
} else {
wsdlURL = new URL(args[0]);
}
service = new GreeterService(wsdlURL);
} else {
service = new GreeterService();
}
Greeter port = service.getGreeterPort();
String[] names = new String[] {"Anne",
"Bill",
"Chris",
"Daisy"};