[JBossWS] - Re: SOAPElement as input param
by oskar.carlstedt
Hi!
Just use a javax.xml.ws.Provider< SOAPElement > provider. You create a class that implements the Provider interface. You'll get something like:
| @Local
| @Stateless
| @WebServiceProvider(
| serviceName = "...",
| portName = "...",
| targetNamespace = "...",
| wsdlLocation = "META-INF/wsdl/...")
| @ServiceMode(value = Service.Mode.PAYLOAD)
| public class MyServiceBean implements Provider<SOAPElement> {
|
| public SOAPElement invoke(SOAPElement requestSOAPElement) {
|
| ...
|
| }
|
| }
|
You can read more about this in the JBossWS documentation. Pay attention to the ServiceMode.PAYLOAD. If you change this to ServiceMode.MESSAGE you can retrieve the whole soap message.
You can only implement the javax.xml.ws.Provider with the types SOAPElement, SOAPMessage and Source (e.g. StreamSource, DOMSource, ...).
Cheers
/Oskar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127172#4127172
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127172
16 years, 10 months
[JBossWS] - Re: Restful web service with JBoss WS ?
by jiehuanli
Did anybody successfully deploy a Restful web service to JBoss server? I am getting the following exception on JBoss-5.0-Beta3 when I deploy my Restful web service, it complains about not being able to find com.sun.xml.ws.transport.http.servlet.WSServletContextListener class which I put in the web.xml by following some sample code on the internet. I copied the jars from the Metro project to the classpath, and I know that class is in those jar files, but no matter where I put them I keep getting the same exception. Any pointers will be highly appreciated.
| 14:48:12,890 INFO [ModifyWebMetaDataDeploymentAspect] Ignore servlet: com.sun.xml.ws.transport.http.servlet.WSServlet
| 14:48:17,484 INFO [TomcatDeployment] deploy, ctxPath=/, vfsUrl=privoapplication.ear/privoweb.war
| 14:48:17,656 ERROR [BaseModelMBean] Exception invoking method addChild
| java.lang.RuntimeException: could not find listener class in classpath
| at org.jboss.web.tomcat.service.TomcatInjectionContainer.processListeners(TomcatInjectionContainer.java:310)
| at org.jboss.web.tomcat.service.TomcatInjectionContainer.processMetadata(TomcatInjectionContainer.java:348)
| at org.jboss.web.tomcat.service.WebAppLoader.start(WebAppLoader.java:104)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4224)
| at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
| at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
| at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.apache.catalina.core.StandardContext.init(StandardContext.java:5357)
| at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:347)
| at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:143)
| at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:341)
| at org.jboss.web.deployers.WebModule.startModule(WebModule.java:89)
| at org.jboss.web.deployers.WebModule.start(WebModule.java:67)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:184)
| at $Proxy5.start(Unknown Source)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
| at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
| at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
| at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:255)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
| at org.jboss.system.ServiceController.doChange(ServiceController.java:659)
| at org.jboss.system.ServiceController.start(ServiceController.java:431)
| at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:149)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:107)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
| at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:65)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:853)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:874)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:906)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:794)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:498)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:506)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:245)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:131)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:408)
| at org.jboss.Main.boot(Main.java:208)
| at org.jboss.Main$1.run(Main.java:534)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.ClassNotFoundException:
| com.sun.xml.ws.transport.http.servlet.WSServletContextListener
|
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
| at org.jboss.web.tomcat.service.TomcatInjectionContainer.processClass(TomcatInjectionContainer.java:278)
| at org.jboss.web.tomcat.service.TomcatInjectionContainer.processListeners(TomcatInjectionContainer.java:306)
| ... 70 more
| 14:48:18,234 ERROR [AbstractKernelController] Error installing to Start: name=jboss.web.deployment:war=/ state=Create mode=Manual requiredState=Installed
| LifecycleException: Pipeline has not been started
| at org.apache.catalina.core.StandardPipeline.stop(StandardPipeline.java:257)
| at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4585)
| at org.apache.catalina.core.ContainerBase.destroy(ContainerBase.java:1164)
| at org.apache.catalina.core.StandardContext.destroy(StandardContext.java:4661)
| at org.apache.catalina.core.StandardContext.init(StandardContext.java:5360)
| at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:347)
| at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:143)
| at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:341)
| at org.jboss.web.deployers.WebModule.startModule(WebModule.java:89)
| at org.jboss.web.deployers.WebModule.start(WebModule.java:67)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:184)
| at $Proxy5.start(Unknown Source)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
| at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
| at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
| at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:255)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
| at org.jboss.system.ServiceController.doChange(ServiceController.java:659)
| at org.jboss.system.ServiceController.start(ServiceController.java:431)
| at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:149)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:107)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
| at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:65)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:853)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:874)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:906)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:794)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:498)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:506)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:245)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:131)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:408)
| at org.jboss.Main.boot(Main.java:208)
| at org.jboss.Main$1.run(Main.java:534)
| at java.lang.Thread.run(Thread.java:595)
| 14:48:20,562 INFO [DefaultEndpointRegistry] remove: jboss.ws:context=,endpoint=VerificationService
| 14:48:20,562 INFO [DefaultEndpointRegistry] remove: jboss.ws:context=,endpoint=PartnerService
| 14:48:20,562 ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/C:/jboss-5.0.0.Beta3/server/default/deploy/privoapplication.ear state=Post
| ClassLoader mode=Manual requiredState=Real
| org.jboss.deployers.spi.DeploymentException: Error deploying: jboss.web.deployment:war=/
| at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:126)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
| at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:65)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:853)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:874)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:906)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:794)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:498)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:506)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:245)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:131)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:408)
| at org.jboss.Main.boot(Main.java:208)
| at org.jboss.Main$1.run(Main.java:534)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: LifecycleException: Pipeline has not been started
| at org.apache.catalina.core.StandardPipeline.stop(StandardPipeline.java:257)
| at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4585)
| at org.apache.catalina.core.ContainerBase.destroy(ContainerBase.java:1164)
| at org.apache.catalina.core.StandardContext.destroy(StandardContext.java:4661)
| at org.apache.catalina.core.StandardContext.init(StandardContext.java:5360)
| at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:347)
| at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:143)
| at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:341)
| at org.jboss.web.deployers.WebModule.startModule(WebModule.java:89)
| at org.jboss.web.deployers.WebModule.start(WebModule.java:67)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:184)
| at $Proxy5.start(Unknown Source)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
| at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
| at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
| at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:255)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
| at org.jboss.system.ServiceController.doChange(ServiceController.java:659)
| at org.jboss.system.ServiceController.start(ServiceController.java:431)
| at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:149)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:107)
| ... 23 more
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127166#4127166
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127166
16 years, 10 months