Question

I am trying to intercept SOAP message of a JWS webservice using SOAPHandlerJax-ws SoapHandler.

Below is the snapshot of what I have done.

  1. Wrote a class JwsSoapRequestValidationHandler which extends SOAPHandler

  2. Created HandlerConfig.xml with the below entry:

<jws:handler-chain>
    <jws:handler>
        <jws:handler-name>SoapRequestValidator</jws:handler-name>
        <jws:handler-class>com.service.ws.jws.JwsSoapRequestValidationHandler</jws:handler-class>
    </jws:handler>
</jws:handler-chain>

  1. I have placed the xml in the same folder as my webservice.
  2. I have annotated my webservice with @HandlerChain(file = "HandlerConfig.xml")

But strangly anf frustratingly, my handler is not invoked. I have deployed my war file in Weblogic 10.3.2

Please help me resolve this issue. I have spent 2 days without any result.......

Thanks a lot for your help.

Was it helpful?

Solution

At last, I got the solution to this problem. We need to make sure that the HandlerConfig.xml file is present in the generated artifact as well.

As soon as I included the xml in my war file, it started invoking the handler. So easy at the end :) ...

Thanks to all. Hope this will be helpful to others.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top