【问题标题】:cxf client and bus configurationcxf 客户端和总线配置
【发布时间】:2015-09-22 11:54:12
【问题描述】:

我配置 cxf 客户端(如下配置)

spring-cxf-client:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:context="http://www.springframework.org/schema/context"
        xmlns:jaxws="http://cxf.apache.org/jaxws"
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns:cxf="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd"
        xsi:schemaLocation="http://www.springframework.org/schema/beans  
        http://www.springframework.org/schema/beans/spring-beans-3.2.xsd  
        http://www.springframework.org/schema/context  
        http://www.springframework.org/schema/context/spring-context-3.2.xsd  
        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">

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

    <jaxws:client id="testClient" serviceClass="com.ws.client.TestWS"  address="http://localhost:7001/ir.school-0.0.1-releases/ws/testService">
         <jaxws:binding>
             <soap:soapBinding version="1.2" mtomEnabled="true" />
         </jaxws:binding>
    </jaxws:client>
    <cxf:bus>
        <cxf:outInterceptors>
             <bean class="com.ws.client.OrderProcessClientHandler" />
        </cxf:outInterceptors>
    </cxf:bus>
</beans>

在 weblogic 12.1.3 上启动应用程序时出现以下错误

引起:org.xml.sax.SAXParseException;行号:22;列号:11; cvc-complex-type.2.4.c:匹配的通配符是严格的,但找不到元素'cxf:bus'的声明。

【问题讨论】:

    标签: web-services cxf jax-ws


    【解决方案1】:

    看着the example in the documentation;您在标头中定义的 xmlns:cxf 包含大量数据,它的值应该只是 http://cxf.apache.org/core 而不是您当前的

        xmlns:cxf="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd"
    

    你应该把它移到xsi:schemaLocation

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-03-12
      • 2016-04-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多