Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAX-WS Authentication

 
Poornima Sharma
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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

Thanks,
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's the realm of WS-Security; Axis2 has the Rampart module that implements it.
 
Poornima Sharma
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic