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

您没有登录

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

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





发贴: 5
积分: 0
于 2010-08-03 14:29 user profilesend a private message to usersend email to gglovervsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Sad
找到一家短信接入的公司,他们的接口是webservice形式的。现在搞活动,可以注册免费发短信。。但不会接入,求代码。。。

========================

webservice地址:http://121.37.58.18:8080/

可以到这里注册试用,貌似有免费短信8条发送。-_-||

http://www.mmlj.cn/



RVstudio
作者 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;
}




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