can you test quickly removing WebServiceContext? (i guess you'll test it faster than if i build up an environment)
- Romain 2012/6/28 [email protected] <[email protected]> > If I've understood correctly it should be possible to use Tomee to create > Web > Services that aren't EJBs. This seems to work to a point. However, resource > injection does not appear to work. Modifying the standard example to: > > import javax.jws.WebService; > > @WebService( > portName = "CalculatorPort", > serviceName = "CalculatorService", > targetNamespace = "http://superbiz.org/wsdl", > endpointInterface = "org.superbiz.calculator.ws.CalculatorWs") > public class Calculator implements CalculatorWs { > > @Resource > WebServiceContext webServiceContext; > > @Resource > UserTransaction userTransaction; > > public int sum(int add1, int add2) { > return add1 + add2; > } > > public int multiply(int mul1, int mul2) { > return mul1 * mul2; > } > } > > results in the following error: > SEVERE: Error deploying CXF webservice for servlet CalculatorService > Throwable occurred: javax.xml.ws.WebServiceException: Service resource > injection failed > at > > org.apache.openejb.server.cxf.pojo.PojoEndpoint.<init>(PojoEndpoint.java:63) > at > > org.apache.openejb.server.cxf.pojo.PojoWsContainer.createEndpoint(PojoWsContainer.java:38) > at > > org.apache.openejb.server.cxf.pojo.PojoWsContainer.createEndpoint(PojoWsContainer.java:26) > at > org.apache.openejb.server.cxf.CxfWsContainer.start(CxfWsContainer.java:53) > at > > org.apache.openejb.server.cxf.CxfService.createPojoWsContainer(CxfService.java:70) > at > > org.apache.openejb.server.webservices.WsService.afterApplicationCreated(WsService.java:326) > at > > org.apache.tomee.webservices.TomeeJaxWsService.afterApplicationCreated(TomeeJaxWsService.java:56) > at > > org.apache.tomee.catalina.WebDeploymentListeners.afterApplicationCreated(WebDeploymentListeners.java:38) > at > > org.apache.tomee.catalina.TomcatWebAppBuilder.afterStart(TomcatWebAppBuilder.java:818) > at > > org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:103) > at > > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) > at > > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) > at > > org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401) > at > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:168) > at > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566) > at > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556) > at > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314) > at java.util.concurrent.FutureTask.run(FutureTask.java:149) > at > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897) > at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919) > at java.lang.Thread.run(Thread.java:736) > Caused by: java.lang.NullPointerException > at > > org.apache.openejb.InjectionProcessor.fillInjectionProperties(InjectionProcessor.java:182) > at > > org.apache.openejb.InjectionProcessor.construct(InjectionProcessor.java:110) > at > > org.apache.openejb.InjectionProcessor.createInstance(InjectionProcessor.java:83) > at > > org.apache.openejb.server.cxf.pojo.PojoEndpoint.<init>(PojoEndpoint.java:59) > ... 20 more > > Should this be possible? Thanks in advance > > -- > View this message in context: > http://openejb.979440.n4.nabble.com/Pojo-Web-Services-tp4655867.html > Sent from the OpenEJB User mailing list archive at Nabble.com. >
