下载此文档

Java调用WebService接口方法.doc


文档分类:IT计算机 | 页数:约4页 举报非法文档有奖
1/4
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/4 下载此文档
文档列表 文档介绍
("addUser");//WSDL里面描述的接口名称
("userName", ,
);//接口的参数
call..);//设置返回类型
String temp = "测试人员";
String result = (String)(new Object[]{temp});
//给方法传递参数,并且调用方法
("result is "+result);
}
catch (Exception e) {
(());
}
}
}
2,直接SOAP调用远程的webservice
这种模式我从来没有见过,也没有试过,但是网络上有人贴出来,我也转过来
..*;
..*;
..*;

import .*;
import .*;
import ;

public class caService{
public static String getService(String user) {
URL url = null;
try {
url=new URL(":8080/ca3/services/caSynrochnized");
} catch (MalformedURLException mue) {
return ();
}
// This is the main SOAP object
Call soapCall = new Call();
// Use SOAP encoding
();
// This is the remote object we're asking for the price
("urn:xmethods-caSynrochnized");
// This is the name of the method on the above object
("getUser");
// We need to send the ISBN number as an input parameter to the method
Vector soapParams = new Vector();

// name, type, value, encoding style
Parameter isb

Java调用WebService接口方法 来自淘豆网m.daumloan.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数4
  • 收藏数0 收藏
  • 顶次数0
  • 上传人ffy51856fy
  • 文件大小0 KB
  • 时间2015-10-11
最近更新