2

I'm trying to use NTLM authentication for my project, but when I'm debugging I get this message, I've been stuck here for a couple of days.

what can be wrong?, this is my code:

String webserviceUrl = "http://ip/folder/page.xml"; // url of the web service.
    String webserviceIP = "up"; // IP of the server.
    String username = "user"; // Domain username
    String password = "pass"; // Domain password
    String deviceIP = "local"; // Device IP 
    String domainName =   "domain"; // Domain name


    DefaultHttpClient httpclient = new DefaultHttpClient();
    httpclient.getAuthSchemes().register("ntlm", new NTLMSchemeFactory());
    httpclient.getCredentialsProvider().setCredentials(
            new AuthScope(webserviceIP, -1),
            new NTCredentials(username, password, deviceIP, domainName));

    HttpGet httpGet = new HttpGet(webserviceUrl);
    httpGet.getParams().setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, false);

    HttpResponse response = httpclient.execute(httpGet); //ERROR HAPPENS HERE
    String responseXML = EntityUtils.toString(response.getEntity());

Not found

NOTES: i added an external jar to the project to use NTML functions. i gave internet permission to the manifest.

//////////////////EDIT i had this problem, i was trying to exec my code from main activity, something about async tasks: How to fix android.os.NetworkOnMainThreadException?

but now I got the source code not found enter image description here

Community
  • 1
  • 1
Bachask8
  • 310
  • 1
  • 7
  • 18

0 Answers0