I know that has been asked before, but none of the solutions worked for me. Probably because they were mostly using EE compliant application servers, which is NOT my case.
I'm running my web service on jetty (through Eclipse) for development only. But even for deployment, I'll use Tomcat 7. So for either development or production, I won't be using a JavaEE compliant server.
- So is it still possible to inject
WebServiceContext
into my web services ?
I've tried the following but it didn't work
@WebService
@BindingType(SOAPBinding.SOAP12HTTP_BINDING)
public class IxProIntegration {
// Tried this, didn't work
@Resource
private WebServiceContext wsContext;
// After commenting the @Resource annotation on the wsContext field
// And adding the annotation here, this still didn't work.
@Resource
@WebMethod(exclude = true)
public void setContext(WebServiceContext context) {
this.wsContext = context;
}
- When someone kindly gives an answer, I would LOVE to know from where did he get that answer ?