title: How to call a nav webservice from android
body: <p>I want to call web service running in Microsoft Dynamics nav ERP i am using ksoap2 library but problem is every time i run my application it throws </p>
  
  <pre><code>java.net.ConnectException: localhost/127.0.0.1:7047 - Connection refused
  </code></pre>
  
  <p>Microsoft Dynamics nav is using NTLM authentication may that is the problem, please give any suggestion to solve it.
  Thanks in advance.</p>
  
  <p>My code is </p>
  
  <pre><code>String namespace = "urn:microsoft-dynamics-schemas/codeunit/NavisionWS";
  String url = "http://localhost:7047/DynamicsNAV/WS/Codeunit/NavisionWS";   
  String soap_action = "urn:microsoft-dynamics-schemas/codeunit/NavisionWS:GetLoginInfo";
  String method_name = "GetLoginInfo";
  try
          {
                SoapObject request = new SoapObject(namespace, method_name);    
                SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
  
                 envelope.dotNet = true;   
                 envelope.setOutputSoapObject(request);   
                 HttpTransportSE transport = new HttpTransportSE(url);    
                 transport.call(soap_action, envelope); // Receive Error here!
                      SoapObject result = (SoapObject) envelope.getResponse();
                      great = result.toString();
          }
          catch (Exception e)
          {
              e.printStackTrace();
                   great = e.toString();
                   Toast.makeText(this, great, Toast.LENGTH_LONG).show();
          }
  </code></pre>