We're all familiar with doing authentication in a soap header
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-18" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>userName</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
And imitating it in java using SOAPHandler. Unfortunately I have one web service where this just ends with a 401. The only way I can get a response in SOAP UI is using the username/password properties for the request.
https://i.stack.imgur.com/kwbbx.jpg
Pic of what I'm talking about in SOAPUI. The problem is I don't know how to set the properties that way in Java.