I\'m using ksoap2 for web service method calls. I used ksoap2-android-assembly-2.5.4-jar-with-dependencies.jar
and was able to retrieve header values from the w
Issue solved.
To save the header contents:
Editor sharedPreferenceEditor = preferences.edit(); List headerList = androidHttpTransport.call(SOAP_ACTION, envelope, null); for (Object header : headerList) { HeaderProperty headerProperty = (HeaderProperty) header; String headerKey = headerProperty.getKey(); String headerValue = headerProperty.getValue(); System.out.println(headerKey +" : " + headerValue); sharedPreferenceEditor.putString(headerKey, headerValue); } sharedPreferenceEditor.commit();
To set the cookie on request:
HeaderProperty headerPropertyObj = new HeaderProperty("cookie", preferences.getString("set-cookie", ""));
headerList.add(headerPropertyObj);
androidHttpTransport.call(SOAP_ACTION, envelope, headerList);