利用Axis在Java平台上部署WebService简明教程
来源:互联网 发布:李宇春整容 知乎 编辑:程序博客网 时间:2024/05/20 13:05
利用Axis在Java平台上部署WebService简明教程
作者:dytt@yeah.net
注:本文Web服务器采用Bea WebLogic
Axis能够让你编写webservice就如同写函数那么简单,下面将一步步介绍:
1、 编写一个Java Class,里面写一个静态函数sayHello(String name),这个sayHello就是我们要编写的用来做接口的webservice函数。(注:一定要写成静态函数,Axis只会把静态函数转换成WebService)
程序代码(HelloBeauty.java)如下:
public class HelloBeauty {
public static void main(String[] args) {
}
public static String sayHello(String name)
{
return name + ",You are a beauty girl . ";
}
}
2、 下载axis-1_1.zip,解压,并部署成Web站点。
Axis-1.1目录结构如下:
Axis-1.1
-----doc
-----lib
-----samples
-----webapps
-----xmls
-----LICENSE
-----README
-----release-notes.html
在web服务器上新增一虚拟目录(这里暂把虚拟目录名设为Axis,可以根据情况自行更改),虚拟目录的根节点设置到Axis-1.1目录。
3、 部署
把我们前面编写的HelloBeauty.java拷贝到Axis-1.1/webapps 目录下,并且把文件后缀改成jws,即HelloBeauty.jws。
4、 访问
打开IE,输入http://Web服务器地址/axis/HelloBeauty.jws
会出现经过Axis处理后的页面,页面内容如下。
There is a Web Service here
Click to see the WSDL
看到上面的页面后即代表你的WebService部署成功了。
其他人可以通过http://Web服务器地址/axis/HelloBeauty.jws?wsdl 来调用你的WebService了。
- 利用Axis在Java平台上部署WebService简明教程
- 利用Axis在Java平台上部署WebService
- 在Axis上部署 WebService
- Java利用Axis远程调用WebService接口
- 使用axis部署webservice
- Apache Axis部署 WebService
- Axis 部署开发WebService
- 利用AXIS添加WebService
- 利用Axis发布WebService
- axis+webservice教程
- 使用Flex与java简单访问在Axis上即时发布型的WebService服务
- 在 Google AppEngine 上部署 WebService(Java)
- 利用axis在现有应用中加入WebService
- 最原始webservice 部署 axis
- tomcat下部署webservice axis
- 利用axis生成webservice代码
- 利用AXIS开发Webservice(一)
- 利用axis请求webservice接口
- 开题报告基本要求
- JDBC学习笔记(二)
- 我也是刚刚学习.net做了一个分页
- 忙碌的一天
- 屏蔽另存为
- 利用Axis在Java平台上部署WebService简明教程
- c++中类数据成员的重载问题
- 中意他
- 在b/s开发中经常用到的javaScript技术1
- 在b/s开发中经常用到的javaScript技术2
- 网站也有盗版!!
- 使用MIDP2.0开发游戏 (1) GameCanvas基础
- 试析J2EE与.NET时代的商业利润
- DAO层开发小结1(注释版)