Где добавить шину cxf: внутри xml-файла конечных точек Apache CXF - PullRequest
0 голосов
/ 10 ноября 2011

Ниже приведен мой файл cxf endpoints.xml

<?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:beans="http://cxf.apache.org/configuration/beans"
    xmlns:jaxws="http://cxf.apache.org/jaxws"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
        http://cxf.apache.org/configuration/beans http://cxf.apache.org/schemas/configuration/cxf-beans.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-extension-soap.xml" />
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />


<bean id="bayer" class="com.tata.bayer.service.BayerWeb" />

  <bean id="logInbound" 
class="org.apache.cxf.interceptor.LoggingInInterceptor"/> 
    <bean id="logOutbound" 
class="org.apache.cxf.interceptor.LoggingOutInterceptor"/> 

    <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl"> 
        <property name="inInterceptors"> 
            <list> 
                <ref bean="logInbound"/> 
            </list> 
        </property> 
        <property name="outInterceptors"> 
            <list> 
                <ref bean="logOutbound"/> 
            </list> 
        </property> 
        <property name="outFaultInterceptors"> 
            <list> 
                <ref bean="logOutbound"/> 
            </list> 
        </property> 
    </bean> 



<jaxws:endpoint id="bayerImpl" implementor="#bayer" address="/bayerWeb"/>


</beans>

Мне нужно добавить для использования log4j

Скажите, пожалуйста, где добавить эти строки ниже под файлом XML выше?

Спасибо.

1 Ответ

1 голос
/ 16 августа 2012

JAX-WS элемент конечной точки имеет атрибут bus. Вы должны указать свой автобус в этом атрибуте. Если вы используете конфигурацию пружины для вашего автобуса, вы должны указать ее следующим образом:

<jaxws:endpoint id="bayerImpl" implementor="#bayer" address="/bayerWeb" bus="#yourCXFBus"/>

Если шина настроена как cxf:bus, то она должна выглядеть следующим образом:

<jaxws:endpoint id="bayerImpl" implementor="#bayer" address="/bayerWeb" bus="yourCXFBus"/>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...