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

天涯浪子 提交于 2019-12-05 18:14:31

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;

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!