You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by "Yang, Gang CTR (US)" <ga...@mail.mil> on 2014/03/13 17:15:32 UTC

Jaxws handler init method is not called

Hi,



I'm using CXF 2.6.6 JAX-WS front. I have a simple JAX-WS service and a JAX-WS handler, which is hooked with the service via the @HandlerChain. The classes is packaged into a war with cxf-servlet.xml defining the JAX-WS service endpoint w/o defining the handler. When the war is deployed into Tomcat 7.0.19, the handler default constructor is called, but not the init() method, which was annotated with @PostConstruct. Appreciate any help.



Thanks,

Gang

Re: Jaxws handler init method is not called

Posted by Daniel Kulp <dk...@apache.org>.
On Mar 13, 2014, at 12:15 PM, Yang, Gang CTR (US) <ga...@mail.mil> wrote:

> Hi,
> I'm using CXF 2.6.6 JAX-WS front. I have a simple JAX-WS service and a JAX-WS handler, which is hooked with the service via the @HandlerChain. The classes is packaged into a war with cxf-servlet.xml defining the JAX-WS service endpoint w/o defining the handler. When the war is deployed into Tomcat 7.0.19, the handler default constructor is called, but not the init() method, which was annotated with @PostConstruct. Appreciate any help.

Can you breakpoint in the constructor and provide a stack trace?   The PostConstruct should be called providing it’s CXF creating the handler and not spring or similar.  Would like to see which code path is calling into the constructor.


-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com