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.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…