CXF之用spring配置服务端实例(2)

这是一个加入了interceptor或feature功能的配置实例。

 

<?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: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/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" /> <!-- endpointName 属性 就是 wsdl:port的name属性,serviceName属性就是wsdl:service的name属性 , 其实可以在java代码中用注解进行配置 --> <jaxws:endpoint id="helloWorld" implementor="cxf.server.HelloWorldImpl" address="/HelloWorld" endpointName="e:HelloWorldEP" serviceName="s:HelloWorldSV" xmlns:e="http://service.jaxws.cxf.apache.org/endpoint" xmlns:s="http://service.jaxws.cxf.apache.org/service"> <jaxws:inInterceptors> <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/> </jaxws:inInterceptors> <jaxws:outInterceptors> <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/> </jaxws:outInterceptors> <!-- <jaxws:features> <bean class="org.apache.cxf.feature.LoggingFeature"/> </jaxws:features> --> </jaxws:endpoint> </beans>  

你可能感兴趣的:(spring,Interceptor,service,Class,import,encoding)