Hi Nuno,

I don't have access to an NTLM environment, but you could try
installing a packet sniffer and see what the traffic between
JWebUnit/HtmlUnit and your NTLM proxy actually is. Where is the 407
being thrown in the code?

Jevon

On Sat, Oct 17, 2009 at 4:54 AM, Nuno Feliciano
<nuno.felici...@novabase.pt> wrote:
> Hi,
>
> I'm having a problem using a proxy server in an "NTLM environment".
>
> Hi wrote this simple client
>
> public class MyTester extends WebTestCase {
>
>        String url = "http://www.google.pt/";;
>
>        public void setUp() throws Exception{
>                super.setUp();
>                String user = "UUUUU";
>                String pass = "XXXXX";
>                String domain = "domain";
>                String proxyHost = "proxyHost";
>                int proxyPort = 8080;
>
>                getTestContext().setNTLMAuthorization(user, pass, domain);
>                getTestContext().setProxyAuthorization(user, pass, proxyHost, 
> proxyPort);
>                setBaseUrl(url);
>        }
>
>        public void test1() {
>
>                beginAt("/");
>                setTextField("q", "java");
>                submit();
>                String source = getPageSource();
>                System.out.println(source);
>        }
>
>        public static void main(String[] args) {
>                try {
>                        TestRunner.run(new TestSuite(MyTester.class));
>                } catch (Exception e) {
>                        e.printStackTrace();
>                }
>        }
> }
>
> I get the error "The server return 407 HTTP code"
>
> I checked that the user, password, domain, proxy host and port are all 
> correct.
> What could be the problem?
>
>
> Thanks in advance,
> Nuno Feliciano
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> JWebUnit-users mailing list
> JWebUnit-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jwebunit-users
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
JWebUnit-users mailing list
JWebUnit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to