Android ksoap sync when using more than one device on the same wireless network :(

In short, my application lasts longer than a year. I have 100,000+ downloads, and only recently have problems with my web services. If two or more devices are connected to the same wireless connection, only one device is working correctly. On all other devices, the connection time ends. Here is an example of a WS call method:

public static Object callWSMethod(String methodName, String soapAction, PropertyInfo[] properties) throws IOException, XmlPullParserException{ SoapObject request = new SoapObject(NAMESPACE, methodName); if (properties != null) for (PropertyInfo property : properties) { request.addProperty(property); } SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER11); envelope.setOutputSoapObject(request); envelope.implicitTypes = true; HttpTransportSE httpTransport = new HttpTransportSE(SOAP_ADDRESS, 15000); httpTransport.debug = true; httpTransport.call(soapAction, envelope); return envelope.getResponse(); } 

Any suggestions or ideas would be helpful.

+1
android ksoap2 android-ksoap2
source share
2 answers

Turns off ksoap2 works fine, and my code works fine. After tracking the method of calling ksoap and sniffing html traffic, I found out that sometimes the server does not respond to my requests. This is because the server configuration has been changed, and now that there are many requests from the same IP address, the server considers some of them to be retransmitted and ignores them. This problem should be resolved on the server side.

0
source share

I set the timeout in milliseconds as shown below when calling webservice

 HttpTransportSE androidHttpTransport = new HttpTransportSE(URL,6000); 

(Note - make sure you are using the latest ksoap2 library. If you want to download the latest version of ksoap2 as shown below, click below to download)

https://oss.sonatype.org/content/repositories/ksoap2-android-releases//com/google/code/ksoap2-android/ksoap2-android-assembly/3.0.0-RC.4/

and click on ksoap2-android-assembly-3.0.0-RC.4.jar

0
source share

All Articles