Description: xfire 5分钟开发一个web service的完整实例-xfire 5 minutes to develop a complete web service example Platform: |
Size: 134144 |
Author:janesjie |
Hits:
Description: 开发环境:jdk1.6 + Tomcat7 + MyEclipse10
源码下载地址张贴在文章最后面:
首先是使用WSDL协议实现:这里使用XFire
XFire一个免费、开源的SOAP框架,它构建了POJO和SOA之间的桥梁,主要特性就是支持将POJO通过非常简单的方式发布成Web服务,其原理是以接口反射机制自动取得远程方法的
WSDL是一个用来描述Web服务和说明如何与Web服务通信的XML语言
准备:开发之前请先下载xfire-distribution-1.2.6.zip并解压缩
(1)、新建一个Web项目(服务端),名称为XFireWebService,其目的是为了测试WebService服务端
为工程添加XFire支持的类库,把xfire-1.2.6里lib所有jar和xfire-all-1.2.6.jar拷贝到工程lib里
(2)、把XFire加载到系统中来,增加web.xml的配置信息.... -Development environment: jdk1.6+ Tomcat7+ MyEclipse10
Download source code posted at the end of the article:
The first is implemented using the WSDL protocol: XFire is used here
XFire a free, open source SOAP framework, which builds a bridge between POJO and SOA, the main feature is to support the POJO in a very simple way to publish into a Web service, the principle is to automatically obtain the remote interface reflection mechanism
A WSDL is an XML language that describes a Web service and describes how to communicate with a Web service
Prepare: Download xfire-distribution-1.2.6.zip and unzip it before proceeding
(1), create a new Web project (server), the name is XFireWebService, its purpose is to test WebService server
XFire support for the project to support the class library, the xfire-1.2.6 lib all jar and xfire-all-1.2.6.jar copy to the project lib
(2), the XFire loaded into the system to increase web.xml configuration information .... Platform: |
Size: 28559360 |
Author:KENNY |
Hits: