一个简单的Web Service.pptVIP

  • 2
  • 0
  • 约3.26千字
  • 约 30页
  • 2018-01-07 发布于河南
  • 举报
一个简单的Web Service

一个简单的Web Service Addition 开发环境 JDK 1.5 NetBeans 6.8 (full) Apache Tomcat 6.0 (安装NB时勾选) WebService服务器端 项目名字:addition 右击Addition项目,选择new-Web services 服务名字:Addition 包名:ws.ds 在Web Services下的Addition上右击,选择Add Operation…. 在Name处输入add, Return Type里输入int, add两个int型参数 修改源代码如下 /** * Web service operation */ @WebMethod(operationName = add) public int add(@WebParam(name = a) int a, @WebParam(name = b) int b) { //TODO write your implementation code here: int c ; c = a + b; return c; } 右击项目,选择clean and build 右击项目名称,选择deploy 部署过程显示的信息 St

文档评论(0)

1亿VIP精品文档

相关文档