加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

CXF配制怕以后忘了

发布时间:2020-12-17 00:59:14 所属栏目:安全 来源:网络整理
导读:一、webservice的配制文件 applicationContext-webservice.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:jaxws="http://cxf.apa

一、webservice的配制文件

applicationContext-webservice.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:jaxws="http://cxf.apache.org/jaxws"
?? ?xmlns:cxf="http://cxf.apache.org/core"
?? ?xmlns:context="http://www.springframework.org/schema/context"
?? ?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
?? ??? ??? ??? ??? ??? ?http://cxf.apache.org/core
?? ????????? ??? ??? ??? ?http://cxf.apache.org/schemas/core.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="helloWorldService" address="/hello">
??????? <jaxws:implementor>
??????????? <ref bean="helloWorld" />
??????? </jaxws:implementor>
??????? <jaxws:inInterceptors>
??????????? <bean class="org.apache.cxf.interceptor.LoggingInInterceptor" />
??????? </jaxws:inInterceptors>
??????? <jaxws:outInterceptors>
??????????? <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor" />
??????? </jaxws:outInterceptors>
??? </jaxws:endpoint>

</beans>


二.接口的写法

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读