List<String> results = new ArrayList<String>(argv.length);
URL wsdlLocation = null;
for (String portPrefix : argv) {
try {
PingService svc;
if (local) {
wsdlLocation = new URL("http://localhost:9001/" + portPrefix + "?wsdl");
}
boolean isLocal = false;
try {
if (wsdlLocation != null) {
wsdlLocation.getContent();
isLocal = true;
}
} catch (Exception e) {
isLocal = false;
}
if (isLocal) {
svc = new PingService(wsdlLocation);
} else {
svc = new PingService();
}
final IPingService port =
svc.getPort(
new QName(
"http://InteropBaseAddress/interop",
portPrefix
),
IPingService.class