您的位置:首页 > 编程语言 > Java开发

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

2010-07-31 15:17 746 查看
]<?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" />
<!-- 第一种方式 -->
<!-- <jaxws:endpoint id="helloWorld" implementor="cxf.server.HelloWorldImpl" address="/HelloWorld" /> -->

<!-- 第二种方式 -->
<!--
<bean id="helloWorldImpl" class="cxf.server.HelloWorldImpl"/>
<jaxws:endpoint id="helloWorld" implementor="#helloWorldImpl" address="/HelloWorld"/>
-->

<!-- 第三种方式 -->
<jaxws:server id="helloWorld" serviceClass="cxf.server.HelloWorld" address="/HelloWorld">
<jaxws:serviceBean>
<bean class="cxf.server.HelloWorldImpl"/>
</jaxws:serviceBean>
</jaxws:server>

</beans>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: