4 Star 4 Fork 0

yacht / maven-framework-project

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
spring-cxf-servlet.xml 2.60 KB
一键复制 编辑 原始数据 按行查看 历史
v5tech 提交于 2013-04-20 15:51 . cxf spring发布webservice
<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-3.1.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="helloWorldBean" class="com.fengjing.framework.webservice.cxf.impl.HelloWorldImpl"></bean>
<bean id="outLoggingInterceptor" class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
<bean id="inLoggingInInterceptor" class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
<!-- 使用jaxws:endpoint发布webservice -->
<!-- <jaxws:endpoint id="helloWorldService" implementor="#helloWorldBean" address="/HelloWorldService"/> -->
<!-- 使用jaxws:server发布webservice -->
<jaxws:server id="helloWorldService" serviceClass="com.fengjing.framework.webservice.cxf.HelloWorld" address="/HelloWorldService">
<jaxws:serviceBean>
<!-- 要暴露的 bean 的引用 -->
<ref bean="helloWorldBean"/>
</jaxws:serviceBean>
<jaxws:inInterceptors>
<ref bean="inLoggingInInterceptor"/>
</jaxws:inInterceptors>
<jaxws:outInterceptors>
<ref bean="outLoggingInterceptor"/>
</jaxws:outInterceptors>
</jaxws:server>
<!-- 通过 jaxws:client方式注入client-->
<!--
<jaxws:client
id="helloClient"
serviceClass="com.fengjing.framework.webservice.cxf.HelloWorld"
address="http://localhost:8080/maven-framework/ws/HelloWorldService?wsdl" />
-->
<!-- 通过 JaxWsProxyFactoryBean方式注入client-->
<bean id="helloClient" class="com.fengjing.framework.webservice.cxf.HelloWorld"
factory-bean="clientFactory" factory-method="create"/>
<bean id="clientFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
<property name="serviceClass" value="com.fengjing.framework.webservice.cxf.HelloWorld"/>
<property name="address" value="http://localhost:8080/maven-framework/ws/HelloWorldService"/>
<property name="inInterceptors">
<list>
<ref bean="inLoggingInInterceptor"/>
</list>
</property>
<property name="outInterceptors">
<list>
<ref bean="outLoggingInterceptor"/>
</list>
</property>
</bean>
</beans>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yacht/maven-framework-project.git
git@gitee.com:yacht/maven-framework-project.git
yacht
maven-framework-project
maven-framework-project
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891