Shouldn't it be possible to inject an EJB into a jax-ws webservice class? I get
a nullpointerexception when trying to use the EJB, it doesn't look like the ejb
is injected into the webservice class?
Code:
Interface:
@WebService
public interface MyService {
public String echoService(String input);
}
Implementation:
@WebService(endpointInterface = "my.package.MyService")
@SOAPBinding(style = Style.RPC)
public class MyServiceImpl implements MyService {
@EJB
SurveillanceService surveillanceService;
@WebMethod(operationName="echoService")
public String echoService(String input) {
boolean isAvail = surveillanceService.isDatabaseAvailable();
return "Hi " + input + ", result from ejb: " + isAvail;
}
}
The EJB does work (confirmed, I use it in other places), It seems that it is
something with the Webservice > EJB...
Thanks in advance
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119706#4119706
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119706
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user