Handling Authentications

In this lesson, we will learn how to make SOAP web service calls that are secured using plain text username and password.

We have already learned that SOAP can have its own implementation of security using WS-Security. The following is a sample SOAP header to pass plain text username and password:

Sample SOAP authorization header

<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" wsse:mustUnderstand="1">
  <wsse:UsernameToken>
     <wsse:Username>testuser</wsse:Username>
     <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">testpass</wsse:Password>
  </wsse:UsernameToken>
</wsse:Security>

In the ...