Hi,
I'm trying to call a webservice and dynamically change the username.
To do that I've tried to add a CXF interceptor that would update the
current username setted by WSS4JOutInterceptor.
Unfortunately, I didn't succeed to make my interceptor to get executed
after WSS4JOutInterceptor so the SoapHeader is empty.
I've tried that :
public class SecurityCxfInterceptor extends AbstractSoapInterceptor
{
public SecurityCxfInterceptor()
{
super(Phase.PRE_PROTOCOL);
// this.getAfter().add(SAAJOutInterceptor.class.getName());
// this.getBefore().add(WSS4JOutInterceptor.class.getName());
this.addAfter(SecurityCxfInterceptor.class.getName());
}
with this spring configuration
<bean id="SecurityCxfInterceptor"
class="com.tibco.cts.amxbpm.fwk.security.SecurityCxfInterceptor" />
<cxf:bus>
<cxf:features>
<p:policies />
<cxf:logging />
</cxf:features>
<cxf:outInterceptors>
<ref bean="SecurityCxfInterceptor" />
</cxf:outInterceptors>
</cxf:bus>
And I've aslo tried to extend WSS4JOutInterceptor but it doesn't work,
as WSS4JOutInterceptor just add an EndingInterceptor which point to an
internal call that does the job.
Can somebody put me on the correct track to have my interceptor exectued
after WSS4JOutInterceptor so that I can update the username?
Thanks,
Thomas.