Can't connect to WCF service on Android

前端 未结 2 1958
广开言路
广开言路 2020-12-29 16:49

I am trying to connect to a .NET WCF service in Android using kSOAP2 (v 2.1.2), but I keep getting a fatal exception whenever I try to make the service call. I\'m having a b

2条回答
  •  清歌不尽
    2020-12-29 17:06

    Had the same issue and found this: http://code.google.com/p/ksoap2-android/issues/detail?id=35

    See Comments 15 and 17.

    They suggest that you wrap the call to "androidHttpTransport.call(SOAP_ACTION, envelope);" in try/catch and try again in case of an error.

    OR

    Set the system property "http.keepAlive" to "false".

    Later on in that issue someone suggests usage of "KeepAliveHttsTransport".

    For me, the (I admit it's dirty) try/catch worked just fine.

    EDIT typo

提交回复
热议问题