title: UserName Authentication web services
body: <p>I need to implement UserName authentication for my web service.</p>
  
  <p>Currently I am considering these two approaches</p>
  
  <ol>
  <li>SOAPHeader: <a href="http://www.codeproject.com/KB/cpp/authforwebservices.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/cpp/authforwebservices.aspx</a></li>
  <li>UserNameToken: WSE 3.0: <a href="http://msdn.microsoft.com/en-us/library/aa480575.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/aa480575.aspx</a></li>
  </ol>
  
  <p>Can anyone tell me pros-cons of these approaches?</p>
  
  <p>One of the major doubt is regarding client being able to consume the service. Client is using Java, would it be possible for them to pass UserNameToken implemented using WSE or are there any integration issues?</p>
  
  <p>EDIT: Also please suggest if there are any better ways (ASMX Services) to implement UserName/Password authentication.</p>