Paul Robinson [https://community.jboss.org/people/paul.robinson] created the 
discussion

"CDI @Inject in a JAX-WS service impl?"

To view the discussion, visit: https://community.jboss.org/message/716601#716601

--------------------------------------------------------------
Hello,

I have a JAX-WS service implementation class, that tries to @Inject a bean. The 
bean does not seem to be injected. If I change the Web service impl to be a 
stateless session bean, the @Inject is done.

Here's my code, in which the inject is not done:

@WebService(serviceName = "EchoServiceService", portName = "EchoServicePort",
        name = "EchoServiceImpl", targetNamespace = "http://my.org/simple";)
@SOAPBinding(style = SOAPBinding.Style.RPC)
public class EchoServiceImpl implements IEchoService
{
     @Inject
    HelloBean hello;
 
    @WebMethod
    public String sayHello(String msg) throws MyException
    {
        //throws a NPE:
        return hello.sayHello(msg);
    }
}


Is this a known limitation of JBossWS, or am I missing something?

Thanks,

Paul.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/716601#716601]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to