File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Current User or session information Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Current User or session information" Watch "Current User or session information" New topic
Author

Current User or session information

Manuel Moons
Ranch Hand

Joined: Mar 05, 2002
Posts: 229
Hello,

Does anyone know how/if I can request the user that is doing the current request in a JAXRPC webservice. I want to return some user specific data from the database but I am not able to see how I can select the user that has done the current request. The user has been authenticated by using basic authentication so his information should be available somewhere!
Rr Kumaran
Ranch Hand

Joined: Sep 17, 2001
Posts: 548
may be you can use JAX-RPC API's that help you read the HTTP Headers. This can be achieved using JAX-RPC Handlers.


RR Kumaran
SCJP 1.4
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 32767
In Axis that's possible with something like the following. Other WS engines probably have a similar mechanism. Just getting the HttpServletRequest is useful in its own right.


[ September 20, 2005: Message edited by: Ulf Dittmer ]

Android appsImageJ pluginsJava web charts
Manuel Moons
Ranch Hand

Joined: Mar 05, 2002
Posts: 229
Yes, I found something similar and it works great. Still hoping to find someting without having to use Axis specific classes. But it works and thats the most important thing of course.
 
 
subject: Current User or session information
 
Threads others viewed
Capture Page refresh in jsp
HFSJ Chapter 12 question
SAML. Very need practical advices ?
capturing browser refresh event
Tomcat capacity planning
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com