java - Why can't I inject a WebServiceContext into a Jax-WS logical Handler -


i have logical handler web service need access servlet's context (via web service context, thinking).

package test;  public class newlogicalhandler implements logicalhandler<logicalmessagecontext> {     @resource    private webservicecontext context;  

error when deploy:

<servlet: "test.ws1" failed preload on startup in web application: "web". java.lang.classnotfoundexception: test.newlogicalhandler     @ java.net.urlclassloader.findclass(urlclassloader.java:381)     @ java.lang.classloader.loadclass(classloader.java:424)     @ sun.misc.launcher$appclassloader.loadclass(launcher.java:331)     @ java.lang.classloader.loadclass(classloader.java:357) 

if inject web service proper:

@webservice(..stuff...) @handlerchain(file = "handler.xml") public class ws1 {     @resource    private webservicecontext context;       

that works fine.

never mind. can servlet context logicalmessagecontext.get(messagecontext.servlet_context);


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -