Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Ksoap2 Null Pointer Exception
    primarykey
    data
    text
    <p>Here is how i Build My Kosap request XML :</p> <pre><code>public static SoapSerializationEnvelope constructEnvelope (String METHOD_NAME, List&lt;NameValuePair&gt; properties) { SoapObject request = new SoapObject(Constants.NAMESPACE, METHOD_NAME); if (null != properties &amp;&amp; !properties.isEmpty() &amp;&amp; properties.size() &gt; 0) { for (NameValuePair prop : properties) { request.addProperty(prop.getName(), prop.getValue()); } } SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); if (null != properties &amp;&amp; !properties.isEmpty() &amp;&amp; properties.size() &gt; 0) { envelope.addMapping(Constants.NAMESPACE, METHOD_NAME, request.getClass()); } return envelope; } </code></pre> <p><strong>Stack Trace :</strong></p> <pre><code>04-08 16:46:42.292: WARN/System.err(19812): java.lang.NullPointerException 04-08 16:46:42.292: WARN/System.err(19812): at org.ksoap2.transport.ServiceConnectionSE.getResponseProperties(ServiceConnectionSE.java:85) 04-08 16:46:42.292: WARN/System.err(19812): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:189) 04-08 16:46:42.292: WARN/System.err(19812): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:114) 04-08 16:46:42.292: WARN/System.err(19812): at com.cantorfuturesexchange.CantorBinaryOptions.ui.LogInActivity$PracticeRegistration.doInBackground(LogInActivity.java:665) 04-08 16:46:42.292: WARN/System.err(19812): at com.cantorfuturesexchange.CantorBinaryOptions.ui.LogInActivity$PracticeRegistration.doInBackground(LogInActivity.java:623) 04-08 16:46:42.292: WARN/System.err(19812): at android.os.AsyncTask$2.call(AsyncTask.java:287) 04-08 16:46:42.292: WARN/System.err(19812): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) 04-08 16:46:42.302: WARN/System.err(19812): at java.util.concurrent.FutureTask.run(FutureTask.java:137) 04-08 16:46:42.302: WARN/System.err(19812): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) 04-08 16:46:42.302: WARN/System.err(19812): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) 04-08 16:46:42.302: WARN/System.err(19812): at java.lang.Thread.run(Thread.java:856) 04-08 16:46:42.342: ERROR/MP-Decision(1576): UP Ld:55 Nw:1.990000 Tw:140 rq:2.800000 seq:147.000000 04-08 16:46:42.793: ERROR/MP-Decision(1576): DOWN Ld:18 Ns:1.100000 Ts:190 rq:0.000000 seq:197.000000 04-08 16:46:43.574: WARN/PowerManagerService(718): Timer 0x7-&gt;0x3|0x0 </code></pre> <p><strong>Research effort :</strong> </p> <p>By changing my envelope creation as explained in the following link : <a href="https://stackoverflow.com/questions/14723386/httptransportse-call-method-returns-nullpointerexception-frequently">HttpTransportSE.call method returns NullPointerException frequently</a></p> <pre><code>public static SoapSerializationEnvelope constructEnvelope (String METHOD_NAME, List&lt;NameValuePair&gt; properties) { SoapObject request = new SoapObject(Constants.NAMESPACE, METHOD_NAME); if (null != properties &amp;&amp; !properties.isEmpty() &amp;&amp; properties.size() &gt; 0) { for (NameValuePair prop : properties) { PropertyInfo property = new PropertyInfo(); { property.name = prop.getName(); property.setNamespace(Constants.NAMESPACE); property.setValue(prop.getValue()); } request.addProperty(property); } } SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); if (null != properties &amp;&amp; !properties.isEmpty() &amp;&amp; properties.size() &gt; 0) { envelope.addMapping(Constants.NAMESPACE, METHOD_NAME, request.getClass()); } return envelope; } </code></pre> <p>I have even found few other links which i have tried everything like using Ksoap version 3.0.0 rather than version 3.0.0-rc4 nothing works. I even found a link which states something about checking the basics but i am not able to understand how to fix the issue. below is the link for that.</p> <p><a href="https://stackoverflow.com/questions/12723517/android-ksoap2-serviceconnectionse-nullpointerexception">Android KSOAP2 ServiceConnectionSE NullPointerException</a></p>
    singulars
    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.
 

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