+ -
当前位置:首页 → 问答吧 → 为什么connection.getResponseCode会抛IOException

为什么connection.getResponseCode会抛IOException

时间:2011-11-28

来源:互联网

下面是我的代码,testURL是另外一台机器,我在我的机器上call那个webservice的时候,会抛IOException,请高手指教问题出在哪里?

String testURL = "http://10.70.3.181:8080/test/wservices/mytest?wsdl";
URL url = new URL (testURL);
HttpURLConnection connection = (HttpURLConnection)url.openConnection ();
int state = connection.getResponseCode ();

作者: lliushine   发布时间: 2011-11-28

IOException - if an error occurred connecting to the server.

作者: huntor   发布时间: 2011-11-28

热门下载

更多