Solved

HttpUnit & Client Certification

Posted on 2004-04-29
2
538 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Suggested Courses

626 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