package client;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
public class TestClient {
public static void main(String[] args) throws Exception {
// 指出service所在URL
String endpoint = "http://127.0.0.1:8088/webService/services/Login.jws";
// 创建一个服务(service)调用(call)
Service service = new Service();
Call call = (Call) service.createCall();// 通过service创建call对象
// 设置service所在URL
call.setTargetEndpointAddress(new java.net.URL(endpoint));
// 方法名(getName)与SayHello.java方法名保持一致
call.setOperationName("getName");
// Object 数组封装了参数,参数为"This is Test!",调用getName(String arg)
String ret = (String) call.invoke(new Object[] { "world"});
System.out.println(ret);
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
java+webService+tomcat+实例
共23个文件
jar:12个
java:2个
class:2个
4星 · 超过85%的资源 需积分: 32 300 下载量 40 浏览量
2012-12-13
17:32:06
上传
评论
收藏 2.63MB RAR 举报
温馨提示
java webService tomcat 实例 项目 部署启动tomcat就可以访问webService 运行测试类看是否成功 jar包齐全.
资源推荐
资源详情
资源评论
收起资源包目录
webService.rar (23个子文件)
webService
.project 1KB
.mymetadata 303B
src
client
TestClient.java 862B
server
SayHello.java 125B
WebRoot
WEB-INF
server-config.wsdd 1KB
classes
client
TestClient.class 1KB
server
SayHello.class 615B
lib
jaxrpc.jar 30KB
wsdl4j-1.5.1.jar 124KB
axis.jar 1.53MB
axis-ant.jar 32KB
commons-discovery-0.2.jar 70KB
xml-apis-2.6.2.jar 122KB
activation.jar 53KB
xmlsec-1.4.2.jar 434KB
mailapi_1_3_1.jar 171KB
log4j-1.2.8.jar 344KB
commons-logging-1.0.4.jar 37KB
saaj.jar 19KB
web.xml 696B
index.jsp 834B
META-INF
MANIFEST.MF 39B
.myeclipse
.classpath 1KB
共 23 条
- 1
lc黑
- 粉丝: 10
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
- 6
前往页