try {
Call call = new Call(new URL("http://live.capescience.com:80/ccx/GlobalWeather"));
call.setUseSOAPAction(true);
call.setSOAPActionURI("capeconnect:GlobalWeather:StationInfo#listCountries");
call.setTimeout(new Integer(15*1000));
call.setOperationName(new javax.xml.namespace.QName("capeconnect:GlobalWeather:StationInfo", "listCountries"));
String[] c = (String[]) call.invoke(new Object[]{});
System.out.println(c.length);
for (int i = 0; i < c.length; i++) {
System.out.println(c[i]);
}
} catch (AxisFault fault) {
if (fault.detail instanceof ConnectException ||
fault.detail instanceof InterruptedIOException ||
(fault.getFaultString().indexOf("Connection timed out") != -1) ||
fault.getFaultCode().getLocalPart().equals("HTTP")) {
System.err.println("getTemp HTTP error: " + fault);
return;
}
throw fault;
}