一、服务端实现。
1.CXF必须包;
2.applicationcontext.xml里面加入
(1)头文件:
<?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:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
&nbs

本文介绍了如何在已有的SSH项目中集成CXF来实现Webservice服务。首先,配置了CXF所需的bean和endpoint,接着通过自定义拦截器允许CXF请求通过。然后,展示了使用@WebService和@WebMethod注解创建服务接口类。最后,讲述了客户端如何生成并调用Webservice的方法。
最低0.47元/天 解锁文章
644





