790
社区成员
发帖
与我相关
我的任务
分享
public int SendMessage(String tel, String content, String mtno) {
// 返回结果
int result = 1;
// 发送内容
try {
msg_Content = content.getBytes("GBK");
} catch (UnsupportedEncodingException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
dest_Terminal_Id = tel.split(",");
// 发送号码
// 存活有效期
valid_Time = new Date(System.currentTimeMillis() + (long) 0xa4cb800); // new
// Date();//
// 定时发送时间
at_Time = null;// new Date(System.currentTimeMillis() + (long)
// 0xa4cb800); //new Date();
// 用户手机上显示为短消息的主叫号码
// src_Terminal_Id=src_Terminal_Id+"001";
// 初始化提交信息
CMPP30SubmitMessage submitMsg = new CMPP30SubmitMessage(pk_Total,
pk_Number, registered_Delivery, msg_Level, service_Id,
fee_UserType, fee_Terminal_Id, tp_Pid, tp_Udhi, msg_Fmt,
result, msg_Src, fee_Type, fee_Code, valid_Time, at_Time,
src_Terminal_Id, dest_Terminal_Id, dest_Terminal_Type,
msg_Content, LinkID);
try {
CMPP30SubmitRepMessage submitRepMsg = (CMPP30SubmitRepMessage) myProxy.send(submitMsg);
if (submitRepMsg.getResult() == 0) { result = 0;
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return result;
}