Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid: Can't connect to Web service by using Ksoap2
    primarykey
    data
    text
    <p>when i send the username and password it send to me a false: the publicKey and username and password not connecting the web service , i don't know if there any problem in the <a href="http://mobilews.terra.net.lb/MobileService.asmx?op=authenticateLogin" rel="nofollow">http://mobilews.terra.net.lb/MobileService.asmx?op=authenticateLogin</a> username is :mabyad password is :dori</p> <p>the MainActivity.java code</p> <pre><code>package com.kak; import android.os.Bundle; import android.os.StrictMode; import com.kak.R; import android.app.Activity; import android.view.Menu; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; //import android.widget.Toast; //import android.view.View.OnClickListener; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.SoapObject; import org.ksoap2.transport.HttpTransportSE; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.serialization.SoapPrimitive; //import android.widget.TextView; //import android.app.ProgressDialog; //import android.os.AsyncTask; public class MainActivity extends Activity { private final static String SOAP_NAMESPACE = "http://mobilews.terra.net.lb"; private static final String SOAP_URL = "http://mobilews.terra.net.lb/MobileService.asmx"; private static final String SOAP_ACTION = "http://tempuri.org/authenticateLogin"; private static final String SOAP_METHOD_NAME = "authenticateLogin"; //private PropertyInfo pi1; Button button1; EditText UserName; EditText Password; public String publicKey; String tv; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build(); StrictMode.setThreadPolicy(policy); setContentView(R.layout.activity_main); button1=(Button)findViewById(R.id.button1); button1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { UserName=(EditText)findViewById(R.id.UserName); Password = (EditText)findViewById(R.id.Password); SoapObject request = new SoapObject(SOAP_NAMESPACE, SOAP_METHOD_NAME); request.addProperty("userName", UserName.getText().toString()); request.addProperty("password",Password.getText().toString()); request.addProperty("publicKey", String.valueOf("Terr@Net$M0bilePK54")); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.setOutputSoapObject(request); envelope.dotNet = true; HttpTransportSE androidHttpTransport = new HttpTransportSE(SOAP_URL); try{ androidHttpTransport.call(SOAP_ACTION, envelope); SoapPrimitive resultString = (SoapPrimitive)envelope.getResponse(); ![android manifest Permissions][1] SoapPrimitive resultInteger =(SoapPrimitive)envelope.getResponse(); tv=resultInteger.toString(); if (resultString!=null || resultInteger !=null) { Toast.makeText(getBaseContext(),tv, Toast.LENGTH_LONG).show(); } else { Toast.makeText(getBaseContext(),"wrong", Toast.LENGTH_LONG).show(); } }catch (Exception e) { e.printStackTrace(); } } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.activity_main, menu); return true; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload