开发者

org.apache.cxf.BusException: No DestinationFactory was found for the namespace http://schemas.xmlsoap.org/soap/http/

In a wsdl-file I have the following line:

When I deploy the webapplication (on JBOSS 5.1.0) and try to access the wsdl I get the following exception:

org.apache.cxf.BusException: No DestinationFactory was found for the na开发者_如何学编程mespace http://schemas.xmlsoap.org/soap/http/.
 org.apache.cxf.transport.DestinationFactoryManagerImpl.getDestinationFactory(DestinationFactoryManagerImpl.java:115)
 org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:85)
 org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:69)
 org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:118)
 org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:167)
 org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:346)
 org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:259)
 org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:209)
 org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:404)
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 java.lang.reflect.Method.invoke(Method.java:597)
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1413)
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1374)
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1334)
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
 java.security.AccessController.doPrivileged(Native Method)
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
 org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
 org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
 org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
 org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
 org.jboss.wsf.stack.cxf.CXFServletExt.loadAdditionalConfigExt(CXFServletExt.java:124)
 org.jboss.wsf.stack.cxf.CXFServletExt.loadBus(CXFServletExt.java:101)
 org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet.java:78)
 org.jboss.wsf.stack.cxf.CXFServletExt.init(CXFServletExt.java:73)
 org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
 org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
 org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
 org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 se.marakanda.jboss.LoginContextValve.invoke(LoginContextValve.java:44)
 org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 java.lang.Thread.run(Thread.java:619)

Anyone knows how this issue can be resolved?


I had the same problem. And none of the google stuff was making sense. I found out in my case that I was missing the following in the spring context file:

<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />


If you're running cxf 3.x but have cxf 2.x jars in your classpath, this can happen. Find the version of your jars like this:

for fn in cxf*.jar; do echo $fn; unzip -p $fn *pom.xml | grep "<version>" | head -1; done;


please add

    <dependency>
       <groupId>org.apache.cxf</groupId>
       <artifactId>cxf-rt-transports-http</artifactId>
       <version>2.7.1</version>
    </dependency>

search maven


Are you doing wsdl first development and specifying wsdlLocation in your WebService.wsdlLocation annotation?

"http://schemas.xmlsoap.org/soap/http/" will work with wsdl2java and a lot of things. But if you're using wsdlLocation for wsdl first deployment, it can be picky and not like the extra slash on the end. So use transport="http://schemas.xmlsoap.org/soap/http" (no slash at the end) in your wsdl.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜