背景:
android emluator使用ksoap调用天气服务
异常:
java.net.SocketTimeoutException: Transport endpoint is not connected
相关代码:
View Code
private static final String SOAP_ACTION = "http://WebXml.com.cn/getWeatherbyCityName"; HttpTransportSE ht = new HttpTransportSE(WS_URL); // AndroidHttpTransport ht = new AndroidHttpTransport(URL); ht.debug = true; ht.call(SOAP_ACTION, envelope);
解决思路:
尝试是否是网络的问题,利用真机的WIFI。