org.apache.cxf.BusException:未找到命名空间 http://schemas.xmlsoap.org/soap/http/ 的 DestinationFactory

发布于 2024-10-05 18:32:29 字数 4351 浏览 8 评论 0原文

在 wsdl 文件中,我有以下行:

当我部署 Web 应用程序(在 JBOSS 5.1.0 上)并尝试访问 wsdl 时,出现以下异常:

org.apache.cxf.BusException: No DestinationFactory was found for the namespace 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)

有人知道如何解决此问题吗?

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 namespace 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

请你别敷衍 2024-10-12 18:32:29

我也有同样的问题。谷歌的所有内容都毫无意义。我发现在我的情况下,我在 spring 上下文文件中缺少以下内容:

<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" />

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" />
我一直都在从未离去 2024-10-12 18:32:29

如果您正在运行 cxf 3.x,但类路径中有 cxf 2.x jar,则可能会发生这种情况。找到你的 jar 的版本,如下所示:

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

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;
云柯 2024-10-12 18:32:29

请添加

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

搜索maven

please add

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

search maven

水晶透心 2024-10-12 18:32:29

您是否正在进行 wsdl 首次开发并在 WebService.wsdlLocation 注释中指定 wsdlLocation ?

“http://schemas.xmlsoap.org/soap/http/”将与 wsdl2java 和很多东西一起使用。但是,如果您使用 wsdlLocation 进行 wsdl 首次部署,那么它可能会很挑剔,而不是像末尾的额外斜杠那样。因此,在 wsdl 中使用 Transport="http://schemas.xmlsoap.org/soap/http" (末尾没有斜杠)。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文