无法解析http://schemas.xmlsoap.org/wsdl/soap/的绑定

时间:2014-10-02 10:46:20

标签: java web-services cxf

我正在使用apache cxf + spring,这些东西在eclipse中运行但不在命令行中运行。继续得到错误无法解决绑定

1 个答案:

答案 0 :(得分:3)

解决方案:

  1. step1:使用maven shade插件
  2. 第2步:如果你使用带cxf的spring,请确保在@Configuration类中添加以下内容

    @ImportResource({“classpath:META-INF / cxf / cxf.xml”,“classpath:META-INF / cxf / cxf-extension http.xml”,“classpath:META-INF / cxf / cxf-extension -soap.xml“})

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

    http://www.java-allandsundry.com/2011/01/orgapachecxfservicefactoryserviceconstr.html