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 web service response. I would like to save any returned cookies and return them with subsequent calls to the web service.
I retrieved the header using the following code:
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); List headerList = androidHttpTransport.call(SOAP_ACTION, envelope, null); for (Object header : headerList) { HeaderProperty headerProperty = (HeaderProperty) header; String headerKey = headerProperty.getKey(); String headerValue = headerProperty.getValue(); }
I tried to save it in SharedPreferences, but was unsuccessful. How cold I do this? Please help.
Thanks in advance.