Java 调用 .net 的 webservice 的 httpclient 方式和 xfire 方式
httpclient 方式 :
1.所需 jar 包( 3 个 jar):
httpclient httclient.jar ,commons-codec.jar ,commons-logging.jar
2.代码: RBSystemWebServce.java
3.参数:
//webservice 地址
String url= "http://192.168.20.24:661/SetMeeting.asmx?wsdl" ;
// 工作空间
String nameSpace= "http://tempuri.org/" ;
//webservice 中的方法名称
String methodName= "GetEnterCodeUserId" ;
// 方法参数名称
String[] paramName={ "MeetingId" , "UserId" };
// 传过去的参数值
String[] paramValue={ "3333" , "1389014" };
String
theStr= getWebServiceStr (url,nameSpace,methodName,paramName,paramV
alue);
http://tempuri.org/ 是在下面图片里面标蓝的地方找到的:
评论0
最新资源