Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.9
-
None
-
Reproduced this on CXF 2.0.9 with Tomcat 5.5.27, the app deploys on 2.1.3
-
Moderate
Description
If you have a service endpoint implementation that does not specify the WSDL location, with some methods that are not WebMethods and the bare parameter style is used, then CXF will fail to publish the enpoint.
When deploying on tomcat I see this error:
04-Dec-2008 14:24:05 org.springframework.web.context.ContextLoader initWebApplicationContext
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'personService': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException:
Service class org.apache.cxf.springtest.PersonImpl method getMultiMap partUnknown macro: {http}getMultiMapResponse cannot be mapped to schema.
Check for use of a JAX-WS-specific type without the JAX-WS service factory bean.
Caused by: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException:
Service class org.apache.cxf.springtest.PersonImpl method getMultiMap partUnknown macro: {http}getMultiMapResponse cannot be mapped to schema.
Check for use of a JAX-WS-specific type without the JAX-WS service factory bean.
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:258)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:192)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:380)
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.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1242)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1208)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:831)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:720)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1218)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1306)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Service
class org.apache.cxf.springtest.PersonImpl method getMultiMap partUnknown macro: {http}getMultiMapResponse cannot be mapped to schema.
Check for use of a JAX-WS-specific type without the JAX-WS service factory bean.
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createBareMessage(ReflectionServiceFactoryBean.java:969)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:347)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:383)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:169)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:98)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:98)
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:114)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:160)
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:327)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:242)
... 35 more
04-Dec-2008 14:24:05 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
04-Dec-2008 14:24:05 org.apache.catalina.core.StandardContext start
SEVERE: Context [/springtest-0.0.1-SNAPSHOT] startup failed due to previous errors
Note this was discussed last month in this thread and the problematic area of code was highlighted. Where a method will be incorrectly returned as a webmethod when it is not defined.
Note this seems to work in 2.0.8 and 2.1.3 (didn't try an earlier 2.1 version). ServiceMix 3 uses CXF 2.0.9 in it's CXF Service Engine where the WSDL location cannot be specified.