用eclipse创建一个WebService Step by Step
来源:互联网 发布:js实现展开收起 编辑:程序博客网 时间:2024/05/17 10:54
用eclipse创建一个WebService应用非常方便,步骤如下:
1.安装WebService插件。www.eclipse.org网站上有下载,我下载的是wtp-all-in-one-sdk-R-1.5.4-win32,里面就包括了。
2.安装一个web服务器。我这里用的是Tomcat。
3.创建一个Webservice服务。在eclipse中创建一个动态的web工程。New->Project->Dynamic Web Project。创建完成后,写一个service类,比如:
public class LogonService {
public int checkUserRight(String userId, String password) {
//假设进行数据库操作
if (password != null && "fred".equals(userId)) {
return 1;
}
return 0;
}
}
public int checkUserRight(String userId, String password)就是我们要调用的远程方法。
4.在这个类的文件名上点击右键,选择”Web Services"->“Create Web Service”,就会出现下面的界面:
要选上TestClient,这样创建Service的同时,会创建一个Service的test工程。
5.点击next,
选择方法名称,
6.点击"next",点击“Start Server”,就会启动Tomcat,并将工程部署上去。
- 用eclipse创建一个WebService Step by Step
- 用eclipse创建WebService Step by Step
- 用eclipse创建WebService Step by Step
- 用eclipse创建WebService Step by Step
- 用eclipse创建WebService Step by Step
- 用eclipse创建WebService Step by Step
- 用eclipse创建WebService Step by Step
- Step by Step 创建一个 Web Service
- Eclipse: Step by Step
- Axis创建自己的WebService--Step by Step
- 用eclipse 单步调试php step by step
- eclipse构建Maven项目 (step-by-step)
- 创建Oracle10g ASM数据库Step by Step
- step by step DBCA创建Oracle数据库
- Axis创建自己的WebService--Step by Step 续
- 在 eclipse 里从svn中 check out 一个maven project 的方法 step by step
- NHibernate Step by Step
- OGRE step by step
- centos lua
- android 图文一起 textview SpannableString和ImageSpan类的使用
- OCP 1Z0 053 202
- 建立 SSL 测试环境
- centos卸载openjdk及安装sun jdk
- 用eclipse创建一个WebService Step by Step
- cocos2dx 检测是否点击到了图片的透明区域
- N皇后问题【DFS】
- 终于做了这个决定别人怎么说我不理
- 在Ubuntu12.04上面安装cuda_6.0.37_linux_64.run
- Access to the requested object is only available from the local network phpmyadmin
- poj 3984 迷宫问题 (bfs入门)
- 关于LDA模型
- 【学习笔记】tablelayout等分控件