 <p>Try this class... its working for me...I am using <strong>Android ksoap2</strong> library...</p> <pre><code>private static final String NAMESPACE = "urn:Magento"; private static final String URL = "http://localhost:8888/Magento/index.php/api/v2_soap/"; private class magentoUserlogin extends AsyncTask&lt;String, String, String&gt; { @Override protected void onPreExecute() { super.onPreExecute(); } @Override protected String doInBackground(String... params) { Object result= null; try { SoapSerializationEnvelope env = new SoapSerializationEnvelope( SoapEnvelope.VER11); env.dotNet = false; env.xsd = SoapSerializationEnvelope.XSD; env.enc = SoapSerializationEnvelope.ENC; SoapObject request = new SoapObject(NAMESPACE, "login"); request.addProperty("username", "&lt;urSOAP/XML username&gt;"); request.addProperty("apiKey", "&lt;yourAPIKey&gt;"); env.setOutputSoapObject(request); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); androidHttpTransport.call("", env); result = env.getResponse(); } catch (Exception e) { e.printStackTrace(); } return result.toString(); } @Override protected void onPostExecute(String s) { super.onPostExecute(s); Log.d("sessionId", s.toString()); Toast.makeText(MainActivity.this, "Session ID: "+s, Toast.LENGTH_LONG).show(); } } </code></pre>