Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java EE 综合讨论区  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 Re:java+webservice [Re:ggloverv]
690716494





发贴: 4
积分: 0
于 2010-12-18 14:30 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Java平台实现:

static String url = "http://121.37.58.18:8080/SMSWebService/services/SMS";
public static void main(String[] args) {
System.out.println(doSendMessage("基本账号;账号密码;手机号码清单(多个中间用","隔开);信息内容".split(";")));
}

/***
* 发送信息
* */
public static String doSendMessage(String[] temp){
String result = "";
Call call = getCall();
call.setTargetEndpointAddress(url);
call.setOperationName("sendMessage");//WSDL里面描述的接口名称//接口的参数
call.addParameter("userAcc", XMLType.XSD_STRING,
ParameterMode.IN);//接口的参数
call.addParameter("passwd", XMLType.XSD_STRING,
ParameterMode.IN);
call.addParameter("telNumber", XMLType.XSD_STRING,
ParameterMode.IN);
call.addParameter("message", XMLType.XSD_STRING,
ParameterMode.IN);
call.setReturnType(XMLType.XSD_STRING);//设置返回类型
try {
result = (String)call.invoke(temp);
} catch (RemoteException e) {
}
return result;
}

/***
* 获得CALL
* */
public static Call getCall(){
Service service = new Service();
Call call = null;
try {
call = (Call)service.createCall();
} catch (ServiceException e) {
}
return call;
}




话题树型展开
人气 标题 作者 字数 发贴时间
12486 java+webservice ggloverv 203 2010-08-03 14:29
11499 Re:java+webservice 690716494 1070 2010-12-18 14:30

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923