Eclipse构建Web Service客户端和服务端(Axis2)

下载Axis2程序:http://axis.apache.org/axis2/java/core/download.cgi
Eclipse中配制Axis2

Eclipse构建Web Service客户端和服务端(Axis2)

构建服务端:

创建Web项目,注意版本为2.5以下

Eclipse构建Web Service客户端和服务端(Axis2)

编写服务端服务程序

Eclipse构建Web Service客户端和服务端(Axis2)

创建Web Service服务端并发布

Eclipse构建Web Service客户端和服务端(Axis2)

Eclipse构建Web Service客户端和服务端(Axis2)

Eclipse构建Web Service客户端和服务端(Axis2)

获取Web Service地址

Eclipse构建Web Service客户端和服务端(Axis2)

Eclipse构建Web Service客户端和服务端(Axis2)

Eclipse构建Web Service客户端和服务端(Axis2)

构建客户端:

创建Web项目,注意版本为2.5以下

通过Web Service地址生成客户端

Eclipse构建Web Service客户端和服务端(Axis2)

Eclipse构建Web Service客户端和服务端(Axis2)

Eclipse构建Web Service客户端和服务端(Axis2)

Eclipse构建Web Service客户端和服务端(Axis2)

Eclipse构建Web Service客户端和服务端(Axis2)

编写客户端调用程序,完成测试

Eclipse构建Web Service客户端和服务端(Axis2)


收工………………

#####################################

错误
出现“The Apache Axis2 Web service runtime in Tomcat vXX Server does not support the service project Service.”错误
原因:只支持2.5版本下的Web程序,新建Web项目注意选择2.5以下的版本

Eclipse构建Web Service客户端和服务端(Axis2)

转载于:https://my.oschina.net/mleo/blog/344879