ksoap を使用してセッション状態を維持するにはどうすればよいですか? asp.net Web サービスから一意の SessionID を送受信する方法が必要です。
だから私は簡単なWebサービスを書きましたが、結果は常に1です....
[ScriptMethod]
[WebMethod(EnableSession = true)]
public string Calculate()
{
if (Session["example"] == null) { Session["example"] = 0; }
int r = Convert.ToInt32(Session["example"]);
r = r + 1;
Session["example"] = r;
return Session["example"].ToString();
}
サーバーから送り返された Cookie から SessionID を何らかの方法で取得し、サービスへのすべての新しい呼び出しでそれを使用する必要があることは知っていますが、その方法はわかりません。Android アプリケーションから呼び出しを行っています