soap - Digest authentication using ksoap2-android-assembly-2.5.8-jar-with-dependencies.jar in android -


i want implement digest authentication on ksoap 2 library in android.

my code::

try {          responsevector = null;         soapobject request = new soapobject(wsdl_target_namespace,                method_name);         (int = 0; < property_key.length; i++) {            request.addproperty(property_key[i], property_value[i]);         }          system.out.println("input::" + request);         soapserializationenvelope envelope = new soapserializationenvelope(                  soapenvelope.ver11);         envelope.setoutputsoapobject(request);         httptransportse androidhttptransport = null;         sslconnection.allowallssl();          androidhttptransport = new httptransportse(url_location);           list<headerproperty> headerlist = new arraylist<headerproperty>();           string ha1=convertpassmd5("abhishek:realm:123456");         uri myuri = uri.parse(url_location);         string uri=method_name+":"+myuri;         string ha2=convertpassmd5(uri);         string reponse=ha1+":nonce:"+ha2;         string reponse1=convertpassmd5(reponse);         headerlist.add(new headerproperty("authorization", "digest  " + reponse1));               androidhttptransport.call(soap_action,envelope,headerlist);         soapobject results = (soapobject)envelope.bodyin;         vector response = (vector)envelope.getresponse();         responsevector =response;         system.out.println("output::"+responsevector);       } catch (xmlpullparserexception e) {       } catch (soapfault e) {      } catch (ioexception e) {       } 

error log

com.piron.flexiguru.frontend d/dalvikvm﹕ late-enabling checkjni 04-24 10:08:10.650  11643-11646/com.xyz.frontend d/dalvikvm﹕ gc_concurrent freed 174k, 4% free 6828k/7047k, paused 3ms+2ms 04-24 10:08:10.790  11643-11664/com.xyz.frontend i/system.out﹕ input::boardlist{name=amit; } 04-24 10:08:10.830  11643-11664/com.xyz.frontend i/system.out﹕ headerlist:[org.ksoap2.headerproperty@41100b70] 04-24 10:08:10.860  11643-11664/com.xyz.frontend i/system.out﹕ request:null 04-24 10:08:10.860  11643-11664/com.xyz.frontend i/system.out﹕ response:null 04-24 10:08:10.920  11643-11643/com.xyz.frontend d/libegl﹕ loaded /system/lib/egl/libegl_tegra.so 04-24 10:08:10.960  11643-11664/com.xyz.frontend i/system.out﹕ pull 04-24 10:08:10.960  11643-11664/com.xyz.frontend w/system.err﹕ org.xmlpull.v1.xmlpullparserexception: unexpected type (position:end_document null@1:1 in java.io.inputstreamreader@41152358) 04-24 10:08:10.960  11643-11664/com.xyz.frontend w/system.err﹕ @ org.kxml2.io.kxmlparser.nexttag(kxmlparser.java:2035) 04-24 10:08:10.960  11643-11664/com.xyz.frontend w/system.err﹕ @ org.ksoap2.soapenvelope.parse(soapenvelope.java:126) 04-24 10:08:10.960  11643-11664/com.xyz.frontend w/system.err﹕ @ org.ksoap2.transport.transport.parseresponse(transport.java:96) 04-24 10:08:10.960  11643-11664/com.xyz.frontend w/system.err﹕ @ org.ksoap2.transport.httptransportse.call(httptransportse.java:189) 04-24 10:08:10.970  11643-11664/com.xyz.frontend w/system.err﹕ @ com.xyz.tools.parssarwithsecure.run(parssarwithsecure.java:155) 04-24 10:08:10.970  11643-11643/com.xyz.frontend d/libegl﹕ loaded /system/lib/egl/libglesv1_cm_tegra.so 04-24 10:08:11.050  11643-11643/com.xyz.frontend d/libegl﹕ loaded /system/lib/egl/libglesv2_tegra.so 04-24 10:08:11.190  11643-11643/com.xyz.frontend d/openglrenderer﹕ enabling debug mode 0 04-24 10:08:11.360  11643-11646/com.xyz.frontend d/dalvikvm﹕ gc_concurrent freed 237k, 5% free 7024k/7367k, paused 4ms+1ms 04-24 10:10:08.660  11643-11643/com.xyz.frontend d/openglrenderer﹕ flushing caches (mode 0) 04-24 10:10:13.510  11829-11833/com.xyz.frontend d/dalvikvm﹕ gc_concurrent freed 166k, 4% free 6835k/7047k, paused 3ms+2ms 


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -