My requirement is to implement a method to generate ws security headers by using incoming username, password.
So some one can invoke my method from xslt by providing username and password and my method should able to return security headers and further they can append this security headers in soap request to call third party web service.
i am looking for api which can generate soap security headers by taking username and password.
i found WSS4JOutInterceptor which needs port and service info,but in my case i have only 2 paramters(UserName, PassWord).
please suggest if any other api/approach than creating SoapEnvelop and adding security elements to it ?
<oas:Security xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <oas:UsernameToken xmlns:oas1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" oas1:Id="UsernameToken-1"> <oas:Username> lakshmi </oas:Username><oas:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">MTQ2NzA5NTg3MjM5Mw==</oas:Nonce> <oas:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">uSlFkVhDynZoCXFojlM1w4UrJYY=</oas:Password><oas1:Created>2016-06-28T06:37:52.425Z</oas1:Created></oas:UsernameToken></oas:Security>