Kaupo, I would strongly suggest changing your wsdl to use the "literal" mode. The "encoded" mode is mostly obsolete now and unsupported by the JAX-WS spec. Also, some parts of Axis2 might support the "encoded" mode but other parts might not. And my guess is that the JAX-WS parts of Axis2 do not. So updating Axis2 version might not work at all. But if you want to try it, I would suggest testing with Geronimo 2.2-SNAPSHOT which uses Axis2 1.5-ish.
Jarek On Thu, Mar 5, 2009 at 11:02 AM, Kaupo <[email protected]> wrote: > > I'm trying to make a new Webservice like this: > import javax.annotation.Resource; > import javax.jws.soap.SOAPBinding; > import javax.xml.soap.SOAPException; > import javax.xml.soap.SOAPMessage; > import javax.xml.ws.Provider; > import javax.xml.ws.ServiceMode; > import javax.xml.ws.WebServiceContext; > import javax.xml.ws.WebServiceProvider; > import javax.xml.ws.Service.Mode; > > @WebServiceProvider(wsdlLocation = "myservice.wsdl", serviceName = > "myservice", targetNamespace = "http://myservice.kparmas.ee/", portName = > "myservicePort") > @SOAPBinding > @ServiceMode(Mode.MESSAGE) > public class MyService implements Provider<SOAPMessage> { > > �...@resource > protected WebServiceContext wsContext; > > �...@override > public SOAPMessage invoke(SOAPMessage request) { > if (request != null) { > try { > System.out.println(request.getSOAPBody().toString()); > } catch (SOAPException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > } > return request; > } > } > > My wsdl file encodes the head and body of the soap message. Apparently axis2 > 1.3 doesn't support that, cause i get an error like this: > 2009-03-05 17:54:09,337 WARN [EndpointDescriptionImpl] The WSDL file could > not be used due to an exception. The WSDL will be ignored and annotations > will be used. Implementaiton class: MyService; WSDL Location: null; > Exception: org.apache.axis2.AxisFault: Encoded use is not supported > org.apache.axis2.AxisFault: Encoded use is not supported > at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) > at > org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:291) > at > org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.buildAxisServiceFromWSDL(EndpointDescriptionImpl.java:789) > at > org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.setupAxisServiceFromDBL(EndpointDescriptionImpl.java:698) > at > org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.<init>(EndpointDescriptionImpl.java:285) > at > org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.<init>(ServiceDescriptionImpl.java:202) > at > org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescriptionFromDBCMap(DescriptionFactoryImpl.java:218) > at > org.apache.axis2.jaxws.description.DescriptionFactory.createServiceDescriptionFromDBCMap(DescriptionFactory.java:125) > at > org.apache.geronimo.axis2.AxisServiceGenerator.getEndpointDescription(AxisServiceGenerator.java:230) > at > org.apache.geronimo.axis2.AxisServiceGenerator.getService(AxisServiceGenerator.java:226) > at > org.apache.geronimo.axis2.AxisServiceGenerator.getServiceFromWSDL(AxisServiceGenerator.java:203) > at > org.apache.geronimo.axis2.Axis2WebServiceContainer.init(Axis2WebServiceContainer.java:137) > at > org.apache.geronimo.axis2.pojo.POJOWebServiceContainer.init(POJOWebServiceContainer.java:71) > at > org.apache.geronimo.axis2.pojo.POJOWebServiceContainerFactoryGBean.getWebServiceContainer(POJOWebServiceContainerFactoryGBean.java:94) > at > org.apache.geronimo.tomcat.TomcatWebAppContext.createWebServices(TomcatWebAppContext.java:281) > at > org.apache.geronimo.tomcat.TomcatWebAppContext.<init>(TomcatWebAppContext.java:255) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:948) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:268) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:541) > at > org.apache.geronimo.gbean.runtime.GBeanDependency.attemptFullStart(GBeanDependency.java:111) > at > org.apache.geronimo.gbean.runtime.GBeanDependency.addTarget(GBeanDependency.java:146) > at > org.apache.geronimo.gbean.runtime.GBeanDependency$1.running(GBeanDependency.java:120) > at > org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:176) > at > org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.java:44) > at > org.apache.geronimo.kernel.basic.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent(BasicLifecycleMonitor.java:254) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:294) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102) > at > org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:555) > at > org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379) > at > org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456) > at > org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:493) > at > org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:188) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:562) > at > org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:543) > at sun.reflect.GeneratedMethodAccessor250.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34) > at > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867) > at > org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239) > at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342) > at sun.reflect.GeneratedMethodAccessor142.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34) > at > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124) > at > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867) > at > org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239) > at > org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172) > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) > at > com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761) > at > javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426) > at > javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72) > at > javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264) > at java.security.AccessController.doPrivileged(Native Method) > at > javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1366) > at > javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788) > at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305) > at sun.rmi.transport.Transport$1.run(Transport.java:159) > at java.security.AccessController.doPrivileged(Native Method) > at sun.rmi.transport.Transport.serviceCall(Transport.java:155) > at > sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535) > at > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790) > at > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:619) > Caused by: > org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException: > Encoded use is not supported > at > org.apache.axis2.description.WSDL11ToAxisServiceBuilder.getPartsListFromSoapBody(WSDL11ToAxisServiceBuilder.java:1777) > at > org.apache.axis2.description.WSDL11ToAxisServiceBuilder.createSchemaForPorttype(WSDL11ToAxisServiceBuilder.java:1528) > at > org.apache.axis2.description.WSDL11ToAxisServiceBuilder.generateWrapperSchema(WSDL11ToAxisServiceBuilder.java:1431) > at > org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:255) > ... 75 more > > > Can I change/upgrade the version of axis2 that geronimo uses? (googling the > problem showed that version 1.4 of axis2 can manage the encoded content) > > -Kaupo > -- > View this message in context: > http://www.nabble.com/Geronimo-Axis2-update-tp22354533s134p22354533.html > Sent from the Apache Geronimo - Users mailing list archive at Nabble.com. > >
