Click here to Skip to main content
14,244,068 members
Rate this:
Please Sign up or sign in to vote.
See more:
Dear Friends,

I'm new to Android programming and this is my first app, However when I press the login button after entering values there is no action. In logcat there is no response in red color which could guide me further. Therefore, I need your kind support.

Many thanks in advance.

What I have tried:

public class MainActivity extends AppCompatActivity {
private static String SOAP_ACTION1 = "";
private static String NAMESPACE = "";
private static String Login = "DroidLogin";
private static String URL = "http://ServerName:123/ws_EMS.Android/Service.asmx?WSDL";

On OnButtonClick:
public void OnButtonClick(View objView) {
//Initialize SOAP request + add parameters
SoapObject loginRequest = new SoapObject(NAMESPACE, Login);

//Use "request" object to add parameters...
EditText a = (EditText) findViewById(;
EditText b = (EditText) findViewById(;
String str1 = a.getText().toString();
String str2 = b.getText().toString();
String str3 = "intrhh";
String str4 = "123456";
boolean isProd = false;
String str5 = "123123";

loginRequest.addProperty("Username", str1);
loginRequest.addProperty("Password", str2);
loginRequest.addProperty("wsUsername", str3);
loginRequest.addProperty("wsPassword", str4);
loginRequest.addProperty("isProduction", isProd);
loginRequest.addProperty("IMEI", str5);

SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;

HttpsTransportSE androidHttpTransport = new HttpsTransportSE(URL,123,"",1000);

//This is the actual part that will call webservice..., envelope);

//Get the SOAP result from the envelope body...
SoapObject wsResult = (SoapObject) envelope.bodyIn;

if (wsResult != null)
Intent objIntent = new Intent(this, items_confirmation.class);
objIntent.putExtra("Username", str1);

Toast.makeText(getApplicationContext(), "No response from WS", Toast.LENGTH_LONG).show();
catch (Exception ex)

public class items_confirmation extends Activity {
protected void onCreate(Bundle savedInstanceState)

String Username = getIntent().getStringExtra("Username");
TextView objTV1 = (TextView) findViewById(;
Updated 13-Feb-16 23:46pm
Richard MacCutchan 14-Feb-16 8:04am
You need to use your debugger to trace what is happening, it is unlikely that anyone here can guess.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100