From: <mar...@bt...> - 2002-11-15 14:17:35
|
Hi, Try to access a page protected with username password. Keep getting the following error 0 [main] WARN httpclient.HttpMethod - No credentials available for the Basic authentication realm 'ISMserver' 350 [main] WARN httpclient.HttpMethod - No credentials available for the Basic authentication realm 'ISMserver' 350 [main] INFO htmlunit.WebClient - statusCode=[401] contentType=[text/plain] 350 [main] INFO htmlunit.WebClient - Unauthorised to access ISM Server. How is the username/password set for the web connection. I have done the following SimpleCredentialProvider creds = new SimpleCredentialProvider("username", "password"); WebClient webClient = new WebClient(BrowserVersion.FULL_FEATURED_BROWSER, "proxy", 8080); webClient.setCredentialProvider(creds); HtmlPage page = (HtmlPage)webClient.getPage( new URL("http","server", 9500, "/ISMserver") ); What piece am I missing? Any assistance would be greatly appreciated. Thanks, Martin Paton email: mar...@bt... BTexact Technologies is a trademark of British Telecommunications plc Registered office: 81 Newgate Street London EC1A 7AJ Registered in England no. 1800000 This electronic message contains information from British Telecommunications plc which may be privileged or confidential. The information is intended to be for the use of the individual(s) or entity named above. If you are not the intended recipient be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this electronic message in error, please notify us by telephone or email (to the numbers or address above) immediately. |