以下是我的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文件中添加以下行的位置??
谢谢。
答案 0 :(得分:1)
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"/>