Running under WebSphere 8 I have an EJB that calls a SOAP web service (using JAX-WS-generated client code). The authentication to the web service is done via LTPA token. Currently Websphere is configured (using a Policy Set and Binding) to automatically create an LTPA token. This token contains the user credentials from the context the EJB is running in.
However, I need to map the current user to a different user to use for the web service call. (i.e. user a calls me, I need to use user x to call the web service. User b calls me, I need to use user y etc.)
Is there a way to dynamically set the credentials for the LTPA token? If not, can I use the Policy Set Bindings to set a static user for the LTPA token, independent of the current context?