]
Alessio Soldano updated JBWS-3845:
----------------------------------
Fix Version/s: jbossws-cxf-5.0
Injection not working in jax-ws handlers defined via CLI
--------------------------------------------------------
Key: JBWS-3845
URL:
https://issues.jboss.org/browse/JBWS-3845
Project: JBoss Web Services
Issue Type: Bug
Components: jbossws-cxf
Environment: JBoss EAP 6.3
Reporter: Roberto Polli
Labels: cdi, handler, jax-ws
Fix For: jbossws-cxf-5.0
Reproduce:
1- deliver [the linked jaxws
webapp|https://github.com/ioggstream/jboss-eap-quickstarts/tree/jaxws-han...]
on EAP6.3
2- add the CDIHandler using the the CLI (eg.) or running the given
[
standalone.xml|https://github.com/ioggstream/jboss-eap-quickstarts/blob/j...]
$ cd /subsystem=webservices/endpoint-config=Standard-Endpoint-Config/
$ /pre-handler-chain=C1:add
$
/pre-handler-chain=C1/handler=H1:add(class="org.jboss.as.quickstarts.wshelloworld.CDIHandler")
$ :reload
3- Invoke
* HelloWorldService.sayHello()
I expect:
A- the CDIBean to be injected
B- the server replying correctly
Instead
B- the injection doesn't happen and the handler raises an exception
Running the Handler via the @HandlerChain annotation (using the provided
HandlerServiceImpl) and removing the handlerchain from jboss everything works fine.
Debugging I found that those handlers are created via ConfigHelper.setupConfigHandlers
which does a clazz.newInstance(). Probably this doesn't go through the CDI chain...