1. Are you ready for the Galaxy S20? Here is everything we know so far!

com.example.user.loginapp I/System.out: (HTTPLog)-Static: isSBSettingEnabled false

Discussion in 'Android Development' started by H Jones, Aug 10, 2018.

  1. H Jones

    H Jones Lurker
    Thread Starter

    Hello,

    I am making a login app that is connected to sql server 2014 via SOAP web service.

    Now everything is working perfectly between the web service and the sql server.

    But in my android app, when I click on the login button nothing happens even though I am sure I entered the username and password correctly. (The app should move to a new activity onclick)

    I am getting this in the logcat when I click the login button:

    com.example.user.loginapp I/System.out: (HTTPLog)-Static: isSBSettingEnabled false

    Any hints ?

    Here is part of my code:

    Code (Java):
    1. public static String URL = "http://192.168.1.68:80/WebService-Test.asmx";
    2.     public static String NAMESPACE = "http://192.168.1.68/:80";
    3.  
    4.  
    5.     public static String SOAP_ACTION_LOGIN = "http://192.168.1.68:80/WebService-Test.asmx?op=Login";
    6.     public static String METHOD_NAME_LOGIN = "Login";
    7.  
    8.  
    9. private class MyAsyncTask extends AsyncTask<String,Void,String>
    10.     {
    11.  
    12.         @Override
    13.         protected String doInBackground(String... strings) {
    14.             SoapObject request = new SoapObject(NAMESPACE,METHOD_NAME_LOGIN);
    15.  
    16.             PropertyInfo infoUser = new PropertyInfo();
    17.             infoUser.setName("Username");
    18.             infoUser.setType(String.class);
    19.             infoUser.setValue(strings[0]);
    20.             request.addProperty(infoUser);
    21.  
    22.             PropertyInfo infoPass = new PropertyInfo();
    23.             infoPass.setName("Password");
    24.             infoPass.setType(String.class);
    25.             infoPass.setValue(strings[1]);
    26.             request.addProperty(infoPass);
    27.  
    28.             SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    29.             envelope.dotNet = true;
    30.             envelope.setOutputSoapObject(request);
    31.  
    32.             try{
    33.                 HttpTransportSE androidHTTPTransportSE = new HttpTransportSE(URL);
    34.                 androidHTTPTransportSE.call(SOAP_ACTION_LOGIN,envelope);
    35.  
    36.                 //SoapObject result = (SoapObject) envelope.bodyIn;
    37.                 if (envelope.bodyIn instanceof SoapFault) {
    38.                     String str= ((SoapFault) envelope.bodyIn).faultstring;
    39.                     Log.i("", str);
    40.                     returnResult = null;
    41.                 } else {
    42.                     SoapObject result = (SoapObject) envelope.bodyIn;
    43.                         returnResult = result.getProperty(0).toString();
    44.  
    45.                     Log.d("WS", String.valueOf(result));
    46.                 }
    47.  
    48.  
    49.             }catch (Exception e){
    50.                 e.printStackTrace();
    51.                 returnResult = null;
    52.                 return e.toString();
    53.             }
    54.  
    55.  
    56.             return returnResult;
    57.         }
    58.  
    59.         protected void OnPostExecute(String result)
    60.         {
    61.             if(result.equals("true"))
    62.             {
    63.                 Intent intent = new Intent(LoginActivity.this,MainActivity.class);
    64.                 //intent.putExtra("GetUsername",userStr);
    65.                 startActivity(intent);
    66.             }
    67.             else
    68.             {
    69.                 Toast.makeText(LoginActivity.this,"Invalid Username/Password",Toast.LENGTH_LONG).show();
    70.             }
    71.         }
    72.     }
     


Loading...

Share This Page

Loading...