I’m getting this exception when trying to access a JAX-WS webservice running on the same WAS 7.0 server as the client.
Caused by: javax.xml.ws.WebServiceException: java.io.IOException: Unable to deserialize the Subjects in this Context, cause: the realms do not match
I have a realm set up for user authentication and this call works fine with that realm disabled. Both server and client are running in the same cell.
My current thinking is that my web service is not providing any realm information at all, causing this problem, so I need to do something in my web service to provide a realm – but what? Even google-fu is failing me on this one!
It turned out to be that there needed to be a trust relationship between my local file-based admin realm and the realm I set up for my users to log on with.
WAS seems to do a lot of security gubbins under the covers, but turning on trace output for WSSecurity stuff helps shed light on problems.