So i'm trying to collect some data from webservice using ksoap. It works fine on older phones, and on newer when i have wifi connection. When i change to broadband from mobile provider it returns error:
java.net.SocketException: Socket is closed
Anybody got any ideas why that happens? It's realy weird i have two phones both connecting to the same webservice both using identicly application and the older one works and new doesn't.
Btw my code:
String METHOD_NAME = "MPList";
String SOAP_ACTION = "https://server.location:443/MobileWS/#MPList";
String NAMESPACE = "https://server.location:443/MobileWS/";
String URL = "https://server.location:443/MobileWS/";
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("user", user);
request.addProperty("pass", pass);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER12);
List<HeaderProperty> headerList = new ArrayList<HeaderProperty>();
headerList.add(new HeaderProperty("Content-Type", "text/xml; charset=utf-8"));
headerList.add(new HeaderProperty("SoapAction", "https://server.location/#MPList"));
envelope.setOutputSoapObject(request);
HttpTransportSE httpTransport = new HttpTransportSE(URL);
httpTransport.debug = true;
try{
httpTransport.call(SOAP_ACTION, envelope, headerList);
SoapObject response = (SoapObject)envelope.bodyIn;
String a=httpTransport.responseDump;
} catch (IOException e2) {
e2.printStackTrace();
} catch (XmlPullParserException e2) {
e2.printStackTrace();
}