This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Web Services and the fly likes JAX-WS Authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "JAX-WS Authentication" Watch "JAX-WS Authentication" New topic
Author

JAX-WS Authentication

Poornima Sharma
Ranch Hand

Joined: Sep 09, 2008
Posts: 113
Hi,

How can we create username password authentication in JAX-WS? I am using Axis2 with tomcat.

Thanks,


Poornima Sharma
SCJP 6.0
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35249
    
    7
That's the realm of WS-Security; Axis2 has the Rampart module that implements it.


Android appsImageJ pluginsJava web charts
Poornima Sharma
Ranch Hand

Joined: Sep 09, 2008
Posts: 113
Hi Ulf,

Thanks for your answer. My only requirement is to create a callback method which can authenticate the username and password and add these two attributes in the header. Is rampart the only way of implementing it? Actually I am using JAX-WS with annotations, hence I was looking for something in annotation which can perform this task. (I am having problem implementing Axis2 1.5.4 and Rampart 1.5.1 with SSL layer.)

Please suggest.

Thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35249
    
    7
There is no standard Java API for how WS-Security integrates with JAX-WS - each SOAP stack does it differently. But none I'm aware of uses annotations. And yes - Rampart is what you use for WS-Security along with Axis2.

You shouldn't be using SSL to secure web services - WS-Security provides encryption as well as authentication.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: JAX-WS Authentication
 
Similar Threads
How to get client IP in WebService ?
JAX-WS RI 2.1 Authantication
JAX-WS Authentication problem -javax.xml.ws.WebServiceException Response: '401: Unauthorized'
How to establish the mutual authentication using "client.cer" file
SOA and REST with JBOSS