reza ramezani matin
reza ramezani matin

Reputation: 1474

cxf client and bus configuration

I config cxf client (below config)

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>

when application was started on weblogic 12.1.3 the below error raised

Caused By: org.xml.sax.SAXParseException; lineNumber: 22; columnNumber: 11; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'cxf:bus'.

Upvotes: 2

Views: 3187

Answers (1)

Sjon
Sjon

Reputation: 5175

Looking at the example in the documentation; your xmlns:cxf defined in the header contains to much data, it's value should be simply http://cxf.apache.org/core instead of your current

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

You should move that to xsi:schemaLocation

Upvotes: 4

Related Questions