KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
i successfully developed one login form. But now I am not able to manage session...also i have read more session concepts.but i can't do it.please explain me in detail. This is my code. Please help how I can use Session part here. This is my coding part: package com.androidlogin.ws; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.PropertyInfo; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapPrimitive; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.HttpTransportSE; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; public class AndroidLoginExampleActivity extends Activity { private final String NAMESPACE = "http://ws.userlogin.com"; private final String URL = "http://111.223.128.10:8085/AndroidLogin/services/Login?wsdl"; private final String SOAP_ACTION = "http://ws.userlogin.com/authentication"; private final String METHOD_NAME = "authentication"; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button login = (Button) findViewById(R.id.btn_login); login.setOnClickListener(new View.OnClickListener() { public void onClick(View arg0) { loginAction(); } }); } private void loginAction(){ SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); EditText userName = (EditText) findViewById(R.id.tf_userName); String user_Name = userName.getText().toString(); EditText userPassword = (EditText) findViewById(R.id.tf_password); String user_Password = userPassword.getText().toString(); //Pass value for userName variable of the web service PropertyInfo unameProp =new PropertyInfo(); unameProp.setName("userName");//Define the variable name in the web
Tags (comma-separated)
Save Edits
Cancel