jaxws:端点inInterceptors未正确调用

时间:2013-04-23 22:54:10

标签: jax-ws

处理调用服务方法后调用拦截器的消息

<jaxws:endpoint id="service" implementor="#testServiceimpl"
        address="/testService"> 
     <jaxws:inInterceptors>
            <bean id="test"
        class="org.example.Test"/>
     </jaxws:inInterceptors>
     </jaxws:endpoint>

public class TestInterceptor extends AbstractSoapInterceptor {

    public TestInterceptor() {
        super(Phase.INVOKE);
    }

@Override
    public void handleMessage(SoapMessage message) throws Fault {
        System.out.println("Test");
}
}

1 个答案:

答案 0 :(得分:0)

超级(Phase.PRE_INVOKE);

对于这个问题,拦截器应该在PRE_INVOKE阶段执行