用MyEclipse生成WEBSERCE客户端,由于WEBSERCE的地址(也就是网上提供的地址)忽然不能用了,但我NEW客户端类时就卡在那里不动,十几分钟都动不了,可能是访问那个地址无反应,但又不中断,部分主要代码:
import javax.xml.ws.Service;
public class WXCityService extends Service { static {
URL url = null;
try {
URL baseUrl;
baseUrl = com.cndatacom.wxcity.handler.service.WXCityService.class
.getResource(".");
url = new URL(baseUrl,
"http://211.136.202.18:9591/ws/wucityservice?wsdl");
} catch (MalformedURLException e) {
logger
.warning("Failed to create URL for the wsdl Location: 'http://211.136.202.18:9591/ws/wucityservice?wsdl', retrying as a local file");
logger.warning(e.getMessage());
}
WXCITYSERVICE_WSDL_LOCATION = url;
}    
          主要卡是在这里,调用父类构建时,一直没反应
public WXCityService() {
super(WXCITYSERVICE_WSDL_LOCATION,
new QName("http://service.handler.wxcity.cndatacom.com/",
"WXCityService"));
我的问题是想,有没有办法能快速反应,就是假如不能访问就直接跳出去?谁有没有办法,多谢
}