• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Programmatically setting user name with Rampart

 
Bai Shen
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So I managed to get my web service up and running with Rampart. However, I have to define the user name for the client in the axis2.xml file. I'd like to be able to set this programmatically, but I'm not sure how to go about doing that. I did some searching, but wasn't able to find any solutions other than don't use Rampart. I'm using Axis2 1.4.1 and Rampart 1.4
 
Bai Shen
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah-hah! Apparently, when Axis2 calls the password handler, you can change the user in the method. You simply call setIdentifier on the WSPasswordCallback. It's the same object that you set the password on. It will override the value set in the axis2.xml file. Not my preferred solution, but it's better than nothing.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic