Hmm... not sure what phase you get if you don't specify one. That might
be why it's not working.
I would suggest doing:
public static class MyInterceptor
extends AbstractPhaseInterceptor<Message> {
public MyInterceptor() {
super(Phase.SETUP);
}
public void handleMessage(Message message) throws Fault {
logger.info("Hi there");
message.put(Message.MAINTAIN_SESSION, true);
}
}
That should make it run at the earliest part of the outgoing chain.
Dan
> thanks for the info.
> I would like to get rid of the JaxWS dependency since SimpleClient is
> good enough for me
>
> I did take a look at
> http://cwiki.apache.org/CXF20DOC/interceptors.html and I ended up
> with:
>
> -------------------------------------
> public static class MyInterceptor extends AbstractSoapInterceptor
> { public void handleMessage(SoapMessage message) throws Fault {
> logger.info("Hi there");
> message.put(Message.MAINTAIN_SESSION, true);
> }
> }
>
> ...
> TestInterface ldap = (TestInterface) context.getBean(TestClient");
>
> ClientProxy.getClient(test).getOutInterceptors().add(new
> MyInterceptor());
>
> |____ This is my proxy client
>
> --------------------------------------
>
> but the message "Hi there" is never printed.
>
> I am obviously missing something but what?
> Maybe the type of the Interceptor that I am extending?
>
> .bill
--
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog