Note that there are some explanatory texts on larger screens.

plurals
  1. POKSOAP2 for Android generates sporadic error
    primarykey
    data
    text
    <p>I have a strange error with the code below: all is working fine for hours, but sometimes I have an exception and my app closes.</p> <p>This is my piece of code that I call very frequently (every 15 seconds)</p> <pre><code>String URL = wscfg.server_address + "/xmds.php"; SoapObject localSoapObject = new SoapObject("", "registerDisplay"); localSoapObject.addProperty("serverKey", wscfg.server_key); localSoapObject.addProperty("hardwareKey", wscfg.hardware_key); localSoapObject.addProperty("version", wscfg.server_version); localSoapObject.addProperty("displayName", wscfg.device_name); SoapSerializationEnvelope localSoapSerializationEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); localSoapSerializationEnvelope.bodyOut = localSoapObject; new HttpTransportSE(URL).call("", localSoapSerializationEnvelope); String s = (String)localSoapSerializationEnvelope.getResponse(); </code></pre> <p>The exception is:</p> <pre><code>01-22 13:33:55.048: E/AndroidRuntime(567): FATAL EXCEPTION: Timer-5 01-22 13:33:55.048: E/AndroidRuntime(567): java.lang.NullPointerException 01-22 13:33:55.048: E/AndroidRuntime(567): at org.ksoap2.transport.ServiceConnectionSE.getResponseProperties(ServiceConnectionSE.java:85) 01-22 13:33:55.048: E/AndroidRuntime(567): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:189) 01-22 13:33:55.048: E/AndroidRuntime(567): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:114) 01-22 13:33:55.048: E/AndroidRuntime(567): at com.gmgunderground.test.xmds.WebServiceManager.requiredFiles(WebServiceManager.java:66) 01-22 13:33:55.048: E/AndroidRuntime(567): at com.gmgunderground.test.xmds.XmdsService.TimerSchedulerSupervisor(XmdsService.java:267) 01-22 13:33:55.048: E/AndroidRuntime(567): at com.gmgunderground.test.xmds.XmdsService.access$1(XmdsService.java:248) 01-22 13:33:55.048: E/AndroidRuntime(567): at com.gmgunderground.test.xmds.XmdsService$3.run(XmdsService.java:552) 01-22 13:33:55.048: E/AndroidRuntime(567): at java.util.Timer$TimerImpl.run(Timer.java:284) </code></pre> <p>How can I solve this error? Is there a way to prevent application from closing and return only null? As I can see from logcat the error is inside the KSOAP2 Android Library.</p> <p>Best regards</p> <p>Gian</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload