Spring CXF 整合 发布WebService

 

 

首页Linux编程

背景:

阅读新闻

Spring CXF 整合 发布WebService

[日期:2013-10-21]   来源:Linux社区  作者:375163948   [字体:]  

web.xml引入CXF和Spring
<?xmlversion="1.0"encoding="UTF-8"?>
<web-appversion="2.5"
xmlns="http://Java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:/cxf-servlet.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
</web-app>

cxf-servlet.xml
<?xmlversion="1.0"encoding="UTF-8"?>
<beansxmlns="http://www.springframework.org/schema/beans"
xmlns:cxf="http://cxf.apache.org/core"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
://www.springframework.org/schema/beans/spring-beans-2.5.xsd
://cxf.apache.org/schemas/jaxws.xsd
://cxf.apache.org/schemas/core.xsd
://cxf.apache.org/schemas/configuration/http-conf.xsd">
<importresource="classpath:META-INF/cxf/cxf.xml"/>
<importresource="classpath:META-INF/cxf/cxf-servlet.xml"/>
<importresource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
<importresource="classpath:/cxf-in.xml"/>
<cxf:bus>
<cxf:inInterceptors>
<beanclass="cxfserver.WsdSoapInInterceptor"/>
</cxf:inInterceptors>
</cxf:bus>
<cxf:bus>
<cxf:inInterceptors>
<beanclass="zkg.SoapInInterceptor"/>
</cxf:inInterceptors>
</cxf:bus>
<beanid="hello"class="cxfserver.HelloWorldImpl"/>
<jaxws:endpointid="helloWorld"implementor="#hello"address="/HelloWorld">
<jaxws:inInterceptors>
<!--<beanclass="cxfserver.WsdSoapInInterceptor"></bean>
<beanclass="zkg.SoapInInterceptor"/>-->
</jaxws:inInterceptors>
</jaxws:endpoint>
</beans>

相关阅读:

运用Spring注解实现Netty服务器端UDP应用程序

Spring2.5.6+Hibernate3+RMI整合

Struts2与Spring整合步骤

Spring集成Quartz定时任务框架介绍和Cron表达式详解

Spring整合Quartz

Spring的Quartz定时器同一时刻重复执行二次的问题解决

Spring 定时器Quartz的用法

Spring联姻Quartz实现作业调度

Map 值增加的最高效的方法 —— 只一次搜索键

OpenCV 绘制直方图

相关资讯       Spring  Spring整合CXF 

   

本文评论   查看全部评论 (0)


评论声明

尊重网上道德,遵守中华人民共和国的各项有关法律法规

承担一切因您的行为而直接或间接导致的民事或刑事法律责任

本站管理人员有权保留或删除其管辖留言中的任意内容

本站有权在网站内转载或引用您的评论

参与本评论即表明您已经阅读并接受上述条款

 

 

 

最新资讯

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/fdd65184b5b52939401c2d5285daf94d.html