App crashing on Android Lollipop when calling web service using ksoap.
Please see error log
java.lang.NoSuchFieldError: No instance field headerOut of type [Lorg/kxml2/kdom/Element; in class Lorg/ksoap2/serialization/SoapSerializationEnvelope; or its superclasses (declaration of 'org.ksoap2.serialization.SoapSerializationEnvelope' appears in /system/framework/wifi-service.jar)
at com.-----.---------.-----.----.services.AuthenticateUser.createHeader(AuthenticateUser.java:77)
at com.-----.---------.-----.----.services.AuthenticateUser.authenticateUser(AuthenticateUser.java:49)
at com.-----.---------.-----.----.services.---------GenericServiceThread.callWS(GenericServiceThread.java:219)
at com.-----.---------.-----.----.services.---------GenericServiceThread.invokeWebServiceApi(GenericServiceThread.java:106)
at com.-----.---------.-----.----.services.---------GenericServiceThread.run(GenericServiceThread.java:89)
I have tested same app on Nexus 4 emulator of Android version 5.0 and is working fine.
I am using below code for calling webservice
mHttpTransportSE = new AndroidHttpTransport (url);
mHttpTransportSE.debug = true; // this is optional, use it if you don't
mHttpTransportSE.call(Configuration.COM_SOAP_ACTION_AUTHENTICATEUSER, envelope);
result = envelope.getResponse();
I have also change AndroidHttpTransport to HttpTransportSE but not sure for that.
Is this change resolve my problem?
Is any other solution for this problem?
Thank you in advance.
I solved it by changing ksoap2 package name to ksoap2clone. I don't know the solution is good but it's now working. Please share, if you find better solution.
File is here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With