Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

HttpUnit & Client Certification

Posted on 2004-04-29
2
Medium Priority
?
546 Views
Last Modified: 2009-12-16
Hello, it seems that today I will spent all my points :)

Friends here is my problem now.
I need to emulate the browser that has a certification.
At the begining I tought I will use a Java program and enter to the Http Hreaders with the name
X-Client-Cert the certification,
enter the username/password with the setRequestProperty
and finally open a connection to the server
and check the answer.

After a while I found the HttpUnit makes exactly this, emulating the browser, perfect I tought do not reinvent the wheel I will use this.

But I cannot find how I will insert into the headers my certification.

Any ideas ???

Thank you in advance
pouli is ready to fly
0
Comment
Question by:pouli
2 Comments
 

Author Comment

by:pouli
ID: 10956686
It seems that I have found something from the mailing list of the HttpUnit

The "wc.setHeaderField()"

       // ssl (https) proxy information
       System.getProperties().put("https.proxySet", "true");
       System.getProperties().put("https.proxyHost",
"www-proxy.company.com");
       System.getProperties().put("https.proxyPort", "80");

       // http proxy information
       wc = new WebConversation();
       wc.setProxyServer( "www-ad-proxy.sabre.com", 80 );
       String password = "user.name:passw0rd";
       String base64Password = "Basic " + Base64.encode(password);
       wc.setHeaderField( "Proxy-Authorization", base64Password );
       ClientProperties cp = wc.getClientProperties();


0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 10957419
PAQ'd and points refunded.

modulo
CS Moderator
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question