This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
We have been passing user name & password for webservice authentication in header information so many days.. Now i need to get that header information (we pass cookie in header) in my final java implementation class. Is there any way that I can set that value somewhere in my handler and get it back in my implementation class? Appreciate your replies.
SCJA, SCJP, SCWCD, SCBCD, SCDJWS.
Joined: Sep 02, 2005
I am using apache axis for developing my webserives. I resolved this issue by making use of messagecontext that comes as a parameter to handler. I set property to messagecontext in handler and getting that property in my java implementation class.
setting in handler--> msgContext.setProperty("key", "cookie"); getting in java impl class--> String cookie = MessageContext.getCurrentContext().getProperty("key");
I know its bad idea to use apache axis related code inside java implementation class but I had no other way!
Is there a particular reason you're not using the standard HTTP authentication mechanism? Which is also an HTTP header, of course, but at least a standardized one. Its client side use is described here, and the server side for Axis is documented here. [ December 13, 2006: Message edited by: Ulf Dittmer ]
Hi, Thanks for your references. The reason for not using standard HTTP Basic Authentication is because of our organization standards. We need to follow our organization security standards. With these standards, one has to pass a cookie generated uniquely from the user name, password & environment(test,qa, prod) through soap header with the hearder name given again by standards. We will use their handlers for authentication, authorization, logging as well..