Ok Guys, I am able to this now.

Here are my code snippets for adding username/password in the HTTP header of a response:

 

Message message = messageContext.getResponseMessage();

                 

                  MimeHeaders hd = (MimeHeaders)message.getMimeHeaders();

                 

                  String temp = userName + ":" + passWord;

                  String authorization = Base64.encode(temp.getBytes());

                  hd.addHeader("Authorization", "Basic " + authorization);

 

Regards,

Ritwik


From: Ritwik Dey [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 18, 2006 8:34 PM
To: [email protected]
Subject: How to add Username-password in response message

 

Hi,

 

I need to add username/password in the HTTP header of a response?

Is it possible to write a response handler for my service to add Basic authentication header in the response.

 

 

Thanks in advance,

Ritwik

 

Reply via email to