跪求各位大神webservice报错问题

java.net.SocketTimeoutException: failed to connect to /192.168.0.181 (port 5039) after 3000ms
1970-01-02 08:00:15 W/System.err( 791): at libcore.io.IoBridge.connectErrno(IoBridge.java:159)
1970-01-02 08:00:15 W/System.err( 791): at libcore.io.IoBridge.connect(IoBridge.java:112)
1970-01-02 08:00:15 W/System.err( 791): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
1970-01-02 08:00:15 W/System.err( 791): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459)
1970-01-02 08:00:15 W/System.err( 791): at java.net.Socket.connect(Socket.java:843)
1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.Platform.connectSocket(Platform.java:131)
1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.Connection.connect(Connection.java:101)
1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:294)
1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255)
1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206)
1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345)
1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:89)
1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:197)
1970-01-02 08:00:15 W/System.err( 791): at org.ksoap2.transport.ServiceConnectionSE.openOutputStream(ServiceConnectionSE.java:126)
1970-01-02 08:00:15 W/System.err( 791): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:179)
1970-01-02 08:00:15 W/System.err( 791): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:116)
1970-01-02 08:00:15 W/System.err( 791): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:111)
1970-01-02 08:00:15 W/System.err( 791): at com.sdmc.hotel.mode.XiRuan.getInfoBySoap(XiRuan.java:215)
1970-01-02 08:00:15 W/System.err( 791): at com.sdmc.hotel.mode.XiRuan.getGuestInfo(XiRuan.java:65)
1970-01-02 08:00:15 W/System.err( 791): java.net.SocketTimeoutException: failed to connect to /192.168.0.181 (port 5039) after 3000ms
1970-01-02 08:00:15 W/System.err( 791): at libcore.io.IoBridge.connectErrno(IoBridge.java:159)
1970-01-02 08:00:15 W/System.err( 791): at libcore.io.IoBridge.connect(IoBridge.java:112)
1970-01-02 08:00:15 W/System.err( 791): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
1970-01-02 08:00:15 W/System.err( 791): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459)
1970-01-02 08:00:15 W/System.err( 791): at java.net.Socket.connect(Socket.java:843)
1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.Platform.connectSocket(Platform.java:131)
1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.Connection.connect(Connection.java:101)
1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:294)
1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255)
1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206)
1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345)
1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:89)
1970-01-02 08:00:15 W/System.err( 791): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:197)
1970-01-02 08:00:15 W/System.err( 791): at org.ksoap2.transport.ServiceConnectionSE.openOutputStream(ServiceConnectionSE.java:126)
1970-01-02 08:00:15 W/System.err( 791): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:179)
1970-01-02 08:00:15 W/System.err( 791): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:116)
1970-01-02 08:00:15 W/System.err( 791): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:111)
1970-01-02 08:00:15 W/System.err( 791): at com.sdmc.hotel.mode.XiRuan.getInfoBySoap(XiRuan.java:215)
1970-01-02 08:00:15 W/System.err( 791): at com.sdmc.hotel.mode.XiRuan.getGuestInfo(XiRuan.java:65)
1970-01-02 08:00:15 W/System.err( 791): at com.sdmc.hotel.ollauncher.WelcomeActivity$GetGuestInfoFromXiruanThread.run(WelcomeActivity.java:1743)
1970-01-02 08:00:15 I/WelcomeActivity-----------TAG( 791): infomafff=
1970-01-02 08:00:15 W/System.err( 791): at com.sdmc.hotel.ollauncher.WelcomeActivity$GetGuestInfoFromXiruanThread.run(WelcomeActivity.java:1743)

3个回答

192.168.0.181 (port 5039)
这个服务器是否存在,是否打开了防火墙端口,服务器是否在正常运行。

你这个地址/192.168.0.181 (port 5039) 上面的webservice有没有启动。

你客户端和服务器的时间不同步引起的错误吧。
日志中的日期 1970-01-02 和实际时间差太多的。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问