为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

精品短信发送API

2018-05-15 50页 doc 130KB 21阅读

用户头像

is_624976

暂无简介

举报
精品短信发送API精品短信发送API 标题/Title: SGIP API(JAVA) For SP 一. 目录 二. 概述 本文提供的API支持多个SP通过英斯克短信网关iDAP接入短信中心,向终端用户发送短消息。SP 的应用程序需要遵循联通的SGIP1.1协议,调用iDAP的API实现短信发送和点播功能。作为ISMG厂 商,英斯克提供接入的Java API,本文解释了API中JAVA API的用法。 三. API文件说明 提供给SP使用的API包名称为spApi.jar,它共包括以下类: SGIP_Command.class,Se...
精品短信发送API
精品短信发送API 标题/Title: SGIP API(JAVA) For SP 一. 目录 二. 概述 本文提供的API支持多个SP通过英斯克短信网关iDAP接入短信中心,向终端用户发送短消息。SP 的应用程序需要遵循联通的SGIP1.1协议,调用iDAP的API实现短信发送和点播功能。作为ISMG厂 商,英斯克提供接入的Java API,本文解释了API中JAVA API的用法。 三. API文件说明 提供给SP使用的API包名称为spApi.jar,它共包括以下类: SGIP_Command.class,Seq.class,MsgHead.class,Bind.class BindResp.class,Unbind.class,UnbindResp.class Submit.class,SubmitResp.class,Deliver.class,DeliverResp.class,Report.class,ReportResp.class,在使用此API 前,请正确地将包设置到CLASSPATH环境变量中。 1. 类SGIP_Command说明 1.1.1 构造函数 1)public SGIP_Command() 作用: 构造函数,创建一个空的SGIP_Command对象 1.1.2 方法 2)public SGIP_Command read(InputStream in) 作用: 接收任何来自网关的命令。 参数: InputStream in 输入流 异常: IOException 3)public int getCommandID() 作用: 获得读取的命令的代码 返回值: 命令代码 4)示例:(具体示例见后面的完整程序) //接收sgip的消息 „ Socket so=null; OutputStream out=null; InputStream input=null; so=new Socket("192.168.0.30",8801); out=new DataOutputStream(so.getOutputStream()); input = new DataInputStream(so.getInputStream()); SGIP_Command sgip=new SGIP_Command();//创建一个空的SGIP_Command对象 SGIP_Command tmp,null; „ tmp=sgip.read(input);// 接收sgip的消息 „ if(sgip.getCommandID()==SGIP_Command.ID_SGIP_BIND_RESP) { resp=(BindResp)tmp;//强制转换 resp.readbody();//解包 System.out.println(tmp.getSeqno_1()); System.out.println(tmp.getSeqno_2()); System.out.println(tmp.getSeqno_3()); System.out.println(resp.GetResult()); } „ 2. 类Bind (该类由SGIP_Command类扩展而来) 1.1.3 构造函数 1) public Bind(int NodeID) 作用: 构造函数 参数: NodeID节点编号,300000+CP_ID 2) public Bind(int NodeID,int LoginType,String LoginName,String LoginPassword) 作用: 构造函数 参数: NodeID, 节点编号 LoginType, 登录类型。 1:SP向SMG建立的连接,用于发送命令 2:SMG向SP建立的连接,用于发送命令 3:SMG之间建立的连接,用于转发命令 4:SMG向GNS建立的连接,用于路由表的检索和维护 5:GNS向SMG建立的连接,用于路由表的更新 6:主备GNS之间建立的连接,用于主备路由表的一致性 11:SP与SMG以及SMG之间建立的测试连接,用于跟踪测试 其它:保留 LoginName, 服务器端给客户端分配的登录名 LoginPassword, 服务器端和Login Name对应的密码 1.1.4 方法 3) public void SetLoginType(int LoginType) 作用: 设置LoginType 参数: int LoginType 4) public void SetLoginName(String LoginName) 作用: 设置LoginName 参数: String LoginName 5) public void SetLoginPassword(String Password) 作用: 设置Password 参数: String Password 6) public int write(OutputStream out) 作用: 发送命令 参数: OutputStream out,输出流 7) public int readbody() 作用: 读取从SMG发送过来的BIND命令 8) public int GetLoginType() 作用: 获取SMG的登录类型 返回值:Int LoginType 9) public String GetLoginName() 作用: 获取SMG的登录名 返回值:String LoginName 10) public String GetLoginPassword() 作用: 获取LoginPassword 返回值:String LoginPassword 11) public int getTotalLength() 作用:返回Bind命令的总长度 12) public int getCommandID() 作用:返回Bind名令的总长度 13) public int getSeqno_1() 作用:返回Bind命令的序列号中前四个字节的整数,第一部分源节点编号,NodeID 14) public int getSeqno_2() 作用:返回Bind命令的序列号中间四个字节的整数,第二部分时间(月日时分秒) 15) public int getSeqno_3() 作用:返回Bind命令的序列号后四个字节的整数, 第三部分序号 )示例:(具体例子见后面的完整程序) 16 1. 发送bind „ Socket so=null; OutputStream out=null; InputStream input=null; so=new Socket("192.168.0.30",8801); out=new DataOutputStream(so.getOutputStream()); input = new DataInputStream(so.getInputStream()); Bind command=new Bind(399000,//nodeID 3+CP_ID 1, //login type "zhao",//login name "zhao");//login password; „ err=command.write(out);// 发送bind if(err!=0) { System.out.println("err"+err); } „ 2. 发送bind „ Socket so=null; OutputStream out=null; InputStream input=null; so=new Socket("192.168.0.30",8801); out=new DataOutputStream(so.getOutputStream()); input = new DataInputStream(so.getInputStream()); Bind command=new Bind(399000//nodeID 3+CP_ID ); command.SetLoginType(1); command.SetLoginName("zhao"); command.SetLoginPassword("zhao"); „ err=command.write(out);// 发送bind if(err!=0) { System.out.println("err"+err); } „ 3. 接收bind „ Socket so=null; OutputStream out=null; InputStream input=null; so=new Socket("192.168.0.30",8801); out=new DataOutputStream(so.getOutputStream()); input = new DataInputStream(so.getInputStream()); SGIP_Command sgip=new SGIP_Command();//创建一个空的SGIP_Command对象 SGIP_Command tmp,null; Bind bind,null; „ tmp=sgip.read(input);// 接收sgip的消息 „ if(sgip.getCommandID()==SGIP_Command.ID_SGIP_BIND) { bind =(Bind)tmp;//强制转换 bind.readbody();//解包 System.out.println(tmp.getSeqno_1()); System.out.println(tmp.getSeqno_2()); System.out.println(tmp.getSeqno_3()); System.out.println(bind.GetResult()); } „ 3. 类Bind Resp(该类由SGIP_Command类扩展而来) 1.1.5 构造函数 1) public BindResp(int NodeID) 作用: 构造函数 参数: NodeID节点标志,300000+CP_ID 2) public BindResp(int NodeID,int Result) 作用: 构造函数 参数: NodeID, 节点标志 Result, Bind执行命令是否成功。 0:执行成功 其它:错误码 1.1.6 方法 3) public void SetResult(int Result) 作用: 设置Result 参数: int Result 4) public int write(OutputStream out) 作用: 发送命令 参数: OutputStream out,输出流 5) public int readbody() 作用: 读取从SMG发送过来的BindResp命令内容 6) public int GetResult() 作用: 获取SMG的登录Result结果 返回值:Int Result 7) public int getTotalLength() 作用:返回BindResp命令的总长度 8) public int getCommandID() 作用:返回BindResp名令的总长度 9) public int getSeqno_1() 作用:返回BindResp命令的序列号中前四个字节的整数,第一部分源节点编号,NodeID 10) public int getSeqno_2() 作用:返回BindResp命令的序列号中间四个字节的整数,第二部分时间(月日时分秒) 11) public int getSeqno_3() 作用:返回BindResp命令的序列号后四个字节的整数, 第三部分序号 12)示例:(具体例子见后面的完整程序) 1. 发送bindresp „ Socket so=null; OutputStream out=null; InputStream input=null; so=new Socket("192.168.0.30",8801); out=new DataOutputStream(so.getOutputStream()); input = new DataInputStream(so.getInputStream()); BindResp bindresp=new BindResp(399000,//node id 3,CP_id 0);//result „ err= bindresp.write(out);// 发送bindresp if(err!=0) { System.out.println("err"+err); } „ 2. 发送bindresp „ Socket so=null; OutputStream out=null; InputStream input=null; so=new Socket("192.168.0.30",8801); out=new DataOutputStream(so.getOutputStream()); input = new DataInputStream(so.getInputStream()); BindResp bindresp=new BindResp(399000//node id 3,CP_id ); „ bindresp.SetResult(1); err= bindresp.write(out);// 发送bindresp if(err!=0) { System.out.println("err"+err); } „ 3. 接收bindresp „ Socket so=null; OutputStream out=null; InputStream input=null; so=new Socket("192.168.0.30",8801); out=new DataOutputStream(so.getOutputStream()); input = new DataInputStream(so.getInputStream()); SGIP_Command sgip=new SGIP_Command();//创建一个空的SGIP_Command对象 SGIP_Command tmp,null; BindResp resp,null; „ tmp=sgip.read(input);// 接收sgip的消息 „ if(sgip.getCommandID()==SGIP_Command.ID_SGIP_BIND_RESP) { resp=(BindResp)tmp;//强制转换 resp.readbody();//解包 System.out.println(tmp.getSeqno_1()); System.out.println(tmp.getSeqno_2()); System.out.println(tmp.getSeqno_3()); System.out.println(resp.GetResult()); } „ 4. 类Unbind (该类由SGIP_Command类扩展而来) Unbind操作由Unbind命令和Unbind_Resp应答组成。通信连接建立以后,客户端如果要停止通信, 需要发送Unbind命令;服务器端收到Unbind命令后,向客户端发送Unbind_Resp相应,然后双方断 开连接。 1.1.7 构造函数 Unbind命令没有消息体。 1) public Unbind(int NodeID) 作用: 构造函数 参数: NodeID节点标志,300000+CP_ID 1.1.8 方法 2) public int write(OutputStream out) 作用: 发送命令 参数: OutputStream out,输出流 3) public int getTotalLength() 作用:返回Unbind命令的总长度 4) public int getCommandID() 作用:返回Unbind名令的总长度 5) public int getSeqno_1() 作用:返回Unbind命令的序列号中前四个字节的整数,第一部分源节点编号,NodeID 6) public int getSeqno_2() 作用:返回Unbind命令的序列号中间四个字节的整数,第二部分时间(月日时分秒) 7) public int getSeqno_3() 作用:返回Unbind命令的序列号后四个字节的整数, 第三部分序号 8) 示例: 1. 发送unbind „ Socket so=null; OutputStream out=null; InputStream input=null; so=new Socket("192.168.0.30",8801); out=new DataOutputStream(so.getOutputStream()); input = new DataInputStream(so.getInputStream()); Unbind unbind=new Unbind (399000//node id 3,CP_id ); „ err= unbind.write(out);// 发送unbind if(err!=0) { System.out.println("err"+err); } „ 2. 接收unbind „ Socket so=null; OutputStream out=null; InputStream input=null; so=new Socket("192.168.0.30",8801); out=new DataOutputStream(so.getOutputStream()); input = new DataInputStream(so.getInputStream()); SGIP_Command sgip=new SGIP_Command();//创建一个空的SGIP_Command对象 SGIP_Command tmp,null; Unbind unbind,null; „ tmp=sgip.read(input);// 接收sgip的消息 „ if(sgip.getCommandID()==SGIP_Command.ID_SGIP_UNBIND) { unbind =(Unbind)tmp;//强制转换 System.out.println(tmp.getSeqno_1()); System.out.println(tmp.getSeqno_2()); System.out.println(tmp.getSeqno_3()); System.out.println(unbind.GetResult()); } „ 5. 类Unbind Resp(该类由SGIP_Command类扩展而来) UnbindResp应答没有消息体。 1.1.9 构造函数 1) public UnbindResp(int NodeID) 作用: 构造函数 参数: NodeID节点标志,300000+CP_ID 1.1.10 方法 2) public int write(OutputStream out) 作用: 发送命令 参数: OutputStream out,输出流 3) public int getTotalLength() 作用:返回UnbindResp命令的总长度 4) public int getCommandID() 作用:返回UnbindResp名令的总长度 5) public int getSeqno_1() 作用:返回UnbindResp命令的序列号中前四个字节的整数,第一部分源节点编号,NodeID 6) public int getSeqno_2() 作用:返回UnbindResp命令的序列号中间四个字节的整数,第二部分时间(月日时分秒) 7) public int getSeqno_3() 作用:返回UnbindResp命令的序列号后四个字节的整数, 第三部分序号 ) 示例: 8 1. 发送unbindresp „ Socket so=null; OutputStream out=null; InputStream input=null; so=new Socket("192.168.0.30",8801); out=new DataOutputStream(so.getOutputStream()); input = new DataInputStream(so.getInputStream()); UnbindResp Unresp=new UnbindResp(399000);//node id 3+CP_id Unresp.write(output); „ 2. 接收unbindresp „ Socket so=null; OutputStream out=null; InputStream input=null; so=new Socket("192.168.0.30",8801); out=new DataOutputStream(so.getOutputStream()); input = new DataInputStream(so.getInputStream()); SGIP_Command sgip=new SGIP_Command();//创建一个空的SGIP_Command对象 SGIP_Command tmp,null; UnbindResp unbindresp,null; „ tmp=sgip.read(input);// 接收sgip的消息 „ if(sgip.getCommandID()==SGIP_Command. ID_SGIP_UNBIND_RESP) { unbindresp =(UnbindResp)tmp;//强制转换 System.out.println(tmp.getSeqno_1()); System.out.println(tmp.getSeqno_2()); System.out.println(tmp.getSeqno_3()); System.out.println(unbindresp.GetResult()); } „ 6. 类Submit(该类由SGIP_Command类扩展而来) 在SP和SMG的通信中,SP用Submit命令向SMG提交MT短消息,发送到用户的手机中。SMG 接收到Submit命令,会返回Submit_Resp应答。SMG根据Submit命令中的付费号码,判断出该命令 是否应从本地SMSC发送,如果属于本地发送,则直接发送到相应的SMSC,否则路由至相应的SMG。 1.1.11 构造函数 1) public Submit( int NodeID, String SPNumber, String ChargeNumber, int UserCount, String[] UserNumber, String CorpId, String ServiceType, int FeeType, String FeeValue, String GivenValue, int AgentFlag, int MOrelatetoMTFlag, int Priority, String ExpireTime, String ScheduleTime, int ReportFlag, int TP_pid, int TP_udhi, int MessageCoding, int MessageType, int MessageLength, String MessageContent) 作用: 构造对象Submit。(消息内容为非二进制) 2) public Submit( int NodeID, String SPNumber, String ChargeNumber, int UserCount, String[] UserNumber, String CorpId, String ServiceType, int FeeType, String FeeValue, String GivenValue, int AgentFlag, int MOrelatetoMTFlag, int Priority, String ExpireTime, String ScheduleTime, int ReportFlag, int TP_pid, int TP_udhi, int MessageCoding, int MessageType, int MessageLength, Byte[] MessageContent) 作用: 构造Submit对象(消息体为二进制) 参数: Int NodeID,节点编号 String SPNumber, SP的接入号码 String ChargeNumber, 付费号码,手机号码前加“86”国别标志;当且仅当群发且对用户收费时为 空;如果为空,则该条短消息产生的费用由UserNumber代表的用户支付; 如果为全零字符串“000”,表示该条短消息产生的费用 由SP支付。 int UserCount, 接收短消息的手机数量,取值范围1至100 String UserNumber, 接收该短消息的手机号,该字段重复UserCount指定的次数,手机号码前加“86” 国别标志 String CorpId, 企业代码,取值范围0-99999 String ServiceType, 业务代码,由SP定义 int FeeType, 计费类型 String FeeValue, 取值范围0-99999,该条短消息的收费值,单位为分,由SP定义 对于包月制收费的用户,该值为月租费的值 String GivenValue, 取值范围0-99999,赠送用户的话费,单位为分,由SP定义,特指由SP向用户 发送广告时的赠送话费 int AgentFlag, 代收费标志,0:应收;1:实收 int MOrelatetoMTFlag, 引起MT消息的原因 0-MO点播引起的第一条MT消息; 1-MO点播引起的非第一条MT消息; 2-非MO点播引起的MT消息; 3-系统反馈引起的MT消息。 int Priority, 优先级0-9从低到高,默认为0 String ExpireTime, 短消息寿命的终止时间,如果为空,表示使用短消息中心的缺省值。时间内容为 16个字符,格式为”yymmddhhmmsstnnp” ,其中“tnnp”取固定值“032+”, 即默认系统为北京时间 String ScheduleTime, 短消息定时发送的时间,如果为空,表示立刻发送该短消息。时间内容为16 个字符,格式为“yymmddhhmmsstnnp” ,其中“tnnp”取固定值“032+”, 即默认系统为北京时间 int ReportFlag, 状态报告标记 0-该条消息只有最后出错时要返回状态报告 1-该条消息无论最后是否成功都要返回状态报告 2-该条消息不需要返回状态报告 其它-保留 缺省设置为0 int TP_pid, GSM协议类型。详细解释请参考GSM03.40中的9.2.3.9(见附录) int TP_udhi, GSM协议类型。详细解释请参考GSM03.40中的9.2.3.23,仅使用1位,右对齐(见附录) int MessageCoding, 短消息的编码格式。 0:纯ASCII字符串 3:写卡操作 4:二进制编码 8:UCS2编码 15: GBK编码 int MessageType, 信息类型: 0-短消息信息 其它:待定 int MessageLength, 消息长度 String MessageContent, 短消息的内容(消息体为非二进制) 或者 Byte[] MessageContent, 短消息的内容(消息体为二进制) 1.1.12 方法 2)public void setSPNumber(String SPNumber) 作用:设置SPNumber 3) public void setChargeNumber(String ChargeNumber) 作用:设置ChargeNumber 4) public int setUserNumber(String dest_Mobile) 作用:设置UserNumber 5) public void setCorpId(String CorpId) 作用:设置CorpId 6) public void setServiceType(String ServiceType) 作用:设置ServiceType 7) public void setFeeType(int FeeType) 作用:设置FeeType 8) public void setFeeValue(String FeeValue) 作用:设置FeeValue ,)public void setAgentFlag(int AgentFlag) 作用:设置AgentFlag 10) public void setMOrelatetoMTFlag(int MOrelatetoMTFlag) 作用:设置MOrelatetoMTFlag 11) public void setPriority(int Priority) 作用:设置Priority 12) public void setExpireTime(String ExpireTime) 作用:设置ExpireTime 13) public void setScheduleTime(String ScheduleTime) 作用:设置ScheduleTime 14) public void setReportFlag(int ReportFlag) 作用:设置ReportFlag 15) public void setTP_pid(int TP_pid) 作用:设置TP_pid 16) public void setTP_udhi(int TP_udhi) 作用:设置TP_udhi 17) public void setMessageType(int MessageType) 作用:设置MessageType 18) public int setContent(int MessageCoding,String MessageContent) 作用:设置MessageCoding和MessageContent(非二进制消息体) 19) public int setBinContent(int ContentLength,byte[] MessageContent) 作用:设置ContentLength和MessageContent(二进制消息体) 20) public int write(OutputStream out) 作用:发送Submit命令 21) public int getTotalLength() 作用:返回Submit命令的总长度 22) public int getCommandID() 作用:返回Submit名令的总长度 23) public int getSeqno_1() 作用:返回Submit命令的序列号中前四个字节的整数,第一部分源节点编号,NodeID 24) public int getSeqno_2() 作用:返回Submit命令的序列号中间四个字节的整数,第二部分时间(月日时分秒) 25) public int getSeqno_3() 作用:返回Submit命令的序列号后四个字节的整数, 第三部分序号 26) 示例: 1. 发送submit „ Socket so=null; OutputStream out=null; InputStream input=null; so=new Socket("192.168.0.30",8801); out=new DataOutputStream(so.getOutputStream()); input = new DataInputStream(so.getInputStream()); Submit submit = new Submit(399000,//node id同上 "9000",//cp_phone "86",//付费号码 2,//接收短消息的手机数 "86,86",//手机号码前面加86 "99000",//cp_id "",//业务代码 0,//计费类型 "500",//短消息收费值 "500",//赠送话费 1,//代收标志 1,//引起MT的原因 9,//优先级 "",//短消息终止时间 "",//+短消息定时发送时间 1,//状态报告标志 1,//GSM协议类型 1,//GSM协议类型 0,//短消息编码格式 0,//信息类型 12,//短消息长度 "123456789012");//短消息内容 „ submit.write(out);// 发送submit 2. 发送submit(二进制文件) „ Socket so=null; OutputStream out=null; InputStream input=null; so=new Socket("192.168.0.30",8801); out=new DataOutputStream(so.getOutputStream()); input = new DataInputStream(so.getInputStream()); Submit submit = new Submit(399000,//?各个字段的意义和上面一样(除byte_content是2进制格式 外) "9000", "86", 2, "86,86", "99000", "", 0, "500", "500", 1, 1, 9, "", "", 1, 1, 1, 4, 0, 140, byte_content); „ submit.write(out);// 发送submit 3. 发送submit(使用set类方法) „ Socket so=null; OutputStream out=null; InputStream input=null; so=new Socket("192.168.0.30",8801); out=new DataOutputStream(so.getOutputStream()); input = new DataInputStream(so.getInputStream()); Submit submit=new Submit(399000); submit.setSPNumber("9200"); submit.setChargeNumber("86"); submit.setUserNumber("86,86"); submit.setCorpId("99001"); submit.setServiceType("123"); submit.setFeeType(2); submit.setFeeValue("50000"); submit.setGivenValue("50001"); submit.setAgentFlag(2); submit.setMOrelatetoMTFlag(3); submit.setPriority(8); submit.setExpireTime("+"); submit.setScheduleTime("+"); submit.setReportFlag(0); submit.setTP_pid(1); submit.setTP_udhi(64); submit.setMessageType(1); submit.setBinContent(10,byte_content); „ submit.write(out);// 发送submit 7. 类SubmitResp(该类由SGIP_Command类扩展而来) 1.1.13 构造函数 1) public SubmitResp() 作用: 构造SubmitResp对象 1.1.14 方法 2) public int readbody() 作用: 读取SubmitResp的消息内容 3) public int getResult() 作用: 返回SubmitResp中的Result值 Result: Submit命令是否成功接收。 0:接收成功 其它:错误码 4) public int getTotalLength() 作用:返回SubmitResp命令的总长度 5) public int getCommandID() 作用:返回SubmitResp名令的总长度 6) public int getSeqno_1() 作用:返回SubmitResp命令的序列号中前四个字节的整数,第一部分源节点编号,NodeID 7) public int getSeqno_2() 作用:返回SubmitResp命令的序列号中间四个字节的整数,第二部分时间(月日时分秒) 8) public int getSeqno_3() 作用:返回SubmitResp命令的序列号后四个字节的整数, 第三部分序号 9) 示例: 1. 接收submitresp „ SGIP_Command sgip =null; SGIP_Command tmp =null; SubmitResp submitresp=null; Socket so=null; OutputStream out=null; InputStream input=null; so=new Socket("192.168.0.30",8801); out=new DataOutputStream(so.getOutputStream()); input = new DataInputStream(so.getInputStream()); tmp=sgip.read(input); if(tmp.getCommandID()==SGIP_Command.ID_SGIP_SUBMIT_RESP) { submitresp=(SubmitResp)tmp;//强制转换 submitresp.readbody();//解包 System.out.println(submitresp.getSeqno_1()); System.out.println(submitresp.getSeqno_2()); System.out.println(submitresp.getSeqno_3()); System.out.println(submitresp.getResult()); } „ 8. 类Report(该类由SGIP_Command类扩展而来) Report命令用于向SP发送一条先前的Submit命令的当前状态,或者用于向前转SMG发送一条先前的 Deliver命令的当前状态。Report命令的接收方需要向发送方返回Report_Resp命令。 1.1.15 构造函数 1) public Report() 作用: 构造Report对象 1.1.16 方法 2) public int readbody() 作用:读取Report消息内容 3) public String getUserNumber() 作用:返回UserNumber 4) public int getReportType() 作用:返回ReportType 5) public int getState() 作用:返回State 6) public int getErrorCode() 作用:返回ErrorCode 7) public int getSeq_1() 作用:返回Report命令的序列号中前四个字节的整数,第一部分源节点编号,NodeID 8) public int getSeq_2() 作用:返回Report命令的序列号中间四个字节的整数,第二部分时间(月日时分秒) 9) public int getSeq_3() 作用:返回SubmitResp命令的序列号后四个字节的整数, 第三部分序号 10)示例: 1. 接收report „ Socket so=null; OutputStream out=null; InputStream input=null; so=new Socket("192.168.0.30",8801); out=new DataOutputStream(so.getOutputStream()); input = new DataInputStream(so.getInputStream()); Report report=null; SGIP_Command sgip =null; SGIP_Command tmp =null; tmp=sgip.read(input); if(tmp.getCommandID()==SGIP_Command.ID_SGIP_REPORT _RESP) { report =( Report)tmp;//强制转换 submitresp.readbody();//解包 System.out.println(report.getSeqno_1()); System.out.println(report.getSeqno_2()); System.out.println(report.getSeqno_3()); System.out.println(report.getSeq_1());//submit的序列号 System.out.println(report.getSeq_2());//submit的序列号 System.out.println(report.getSeq_3());//submit的序列号 System.out.println(report.getReportType()); System.out.println(report.getUserNumber()); System.out.println(report.getState()); System.out.println(report.getErrorCode()); } „ 9. ReportResp(该类由SGIP_Command类扩展而来) Report 应答 1.1.17 构造函数 1) public ReportResp(int NodeID,int Result) 作用:构造Report应答对象 参数:NodeID,源节点编号 Result,Report应答结果 1.1.18 方法 2) public void SetResult(int result) 作用:设置Result值 参数: Result,应答结果 ,)public int getSeqno_1() 作用:返回ReportResp命令的序列号中前四个字节的整数,第一部分源节点编号,NodeID ,) public int getSeqno_2() 作用:返回ReportResp命令的序列号中间四个字节的整数,第二部分时间(月日时分秒) ,) public int getSeqno_3() 作用:返回ReportResp命令的序列号后四个字节的整数, 第三部分序号 6) public int write(OutputStream out) 作用:发送ReportResp 参数:out,输出流 6) 示例: 1. 发送reportresp „ Socket so=null; OutputStream out=null; InputStream input=null; so=new Socket("192.168.0.30",8801); out=new DataOutputStream(so.getOutputStream()); input = new DataInputStream(so.getInputStream()); ReportResp reportresp = new ReportResp(390999,//node id 3+CP_id 0);//result reportresp.SetResult(1);//重新设置result reportresp.write(out); „ 10. 类Deliver(该类由SGIP_Command类扩展而来) 在SP和SMG的通信中,SMG用Deliver命令向SP发送一条MO短消息。SP接收到Deliver命令,会返回Deliver_Resp应答。SMG根据Deliver命令中目的特服号,判断出该服务属于和哪一个SMG相连接的SP, 如果属于本地SP,则直接发送到SP,否则路由至相应的SMG。 1.1.19 构造函数 1) public Deliver() 作用: 构造下发短信对象 1.1.20 方法 2) public int readbody() 作用: 读取Deliver消息内容 ,)public String getUserNumber() 作用: 返回UserNumber,发送短消息的用户手机号,手机号码前加“86”国别标志 4) public String getSPNumber() 作用: 返回SPNumber, SP的接入号码 5) public int getTP_pid() 作用: 返回TP_pid , GSM协议类型。详细解释请参考GSM03.40中的9.2.3.9(见附录) 6) public int getTP_udhi() 作用: 返回TP_udhi, GSM协议类型。详细解释请参考GSM03.40中的9.2.3.23,仅使用1位,右对齐(见附 录) 7) public int getMessageCoding() 作用: 返回MessageCoding, 短消息的编码格式。 0:纯ASCII字符串 3:写卡操作 4:二进制编码 8:UCS2编码 15: GBK编码 8) public int getMessageLength() 作用: 返回MessageLength, 短消息的长度 9) public String getMessageContent() 作用: 返回MessageContent, 短消息的内容 10) public byte[] getMessageByte() 作用: 返回短消息的字节流 11) public int getTotalLength() 作用:返回Deliver命令的总长度 12) public int getCommandID() 作用:返回Deliver名令的总长度 13) public int getSeqno_1() 作用:返回Deliver命令的序列号中前四个字节的整数,第一部分源节点编号,NodeID 14) public int getSeqno_2() 作用:返回Deliver命令的序列号中间四个字节的整数,第二部分时间(月日时分秒) 15) public int getSeqno_3() 作用:返回Deliver命令的序列号后四个字节的整数, 第三部分序号 16)示例: 1. 接收deliver „ Socket so=null; OutputStream out=null; InputStream input=null; so=new Socket("192.168.0.30",8801); out=new DataOutputStream(so.getOutputStream()); input = new DataInputStream(so.getInputStream()); Deliver deliver=null; SGIP_Command sgip =null; SGIP_Command tmp =null; tmp=sgip.read(input); if(tmp.getCommandID()==SGIP_Command.ID_SGIP_DELIVER _RESP) { deliver =(Deliver)tmp;//强制转换 deliver.readbody();//解包 System.out.println(deliver.getSeqno_1()); System.out.println(deliver.getSeqno_2()); System.out.println(deliver.getSeqno_3()); System.out.println(deliver.getUserNumber()); System.out.println(deliver.getSPNumber()); System.out.println(deliver.getTP_pid()); System.out.println(deliver.getTP_udhi()); System.out.println(deliver.getMessageCoding()); System.out.println(deliver.getMessageLength()); System.out.println(deliver.getMessageContent()); } „ 4. 11. 类DeliverResp(该类由SGIP_Command类扩展而来) 1.1.21 构造函数 1) public DeliverResp(int NodeID,int Result) 作用:构造Deliver响应对象 参数:NodeID,源节点编号 Result, Deliver命令是否成功接收。 0:接收成功 其它:错误码 1.1.22 方法 2) public void SetResult(int result) 作用:设置Deliver响应的Result值 参数:Result, 3) public int write(OutputStream out) 作用:发送DeliverResp 参数:out,输出流 4) public int getTotalLength() 作用:返回DeliverResp命令的总长度 5) public int getCommandID() 作用:返回DeliverResp名令的总长度 6) public int getSeqno_1() 作用:返回DeliverResp命令的序列号中前四个字节的整数,第一部分源节点编号,NodeID 7) public int getSeqno_2() 作用:返回DeliverResp命令的序列号中间四个字节的整数,第二部分时间(月日时分秒) 8) public int getSeqno_3() 作用:返回DeliverResp命令的序列号后四个字节的整数, 第三部分序号 9) 示例: 1. 发送deliverresp „ Socket so=null; OutputStream out=null; InputStream input=null; so=new Socket("192.168.0.30",8801); out=new DataOutputStream(so.getOutputStream()); input = new DataInputStream(so.getInputStream()); ReportResp deliverresp = new ReportResp(390999,//node id 3+CP_id 0);//result deliverresp.SetResult(1);//重新设置result deliverresp.write(out); „ 12. 类SGIP_Exception 该类由Exception扩展而来,使用方法和Exception的使用方法相同,但在使用时除了要捕捉SGIP_Exception 外,还要捕捉系统的Exception 可能打出异常信息有: Invalid Mobile Number MessageCoding Error! Use setBinContent() to set Binary Message! Too many users! SPNumber Longer than 21 bytes: ChargeNumber longer than 21 bytes: UserNumber longer than 21 bytes: CorpId longer than 5 bytes: ServiceType longer than 10 bytes: FeeValue longer than 6 bytes: GivenValue longer than 6 bytes: EXpireTime longer than 16 bytes: ScheduleTime longer than 16 bytes: 示例: try { „ }catch (SGIP_Exception e){ System.out.println(e.toString()); } catch (Exception e) { System.out.println(e.toString()); } 四. 完整的示例程序: 1. MT_TEST import spApi.*; import java.net.*; import java.io.*; public class send { public static void main(String[] args) { send atestprocesse=new send(); } public send() { Socket so=null; OutputStream out=null; InputStream input=null; Bind command=null; Bind com=null; SGIP_Command sgip=null; SGIP_Command tmp=null; int i=0; try {//一定要捕捉系统异常 sgip=new SGIP_Command(); command=new Bind(399000,//nodeID 3+CP_ID 1, //login type "zhao",//login name "zhao");//login password int err; byte [] byte_content = new byte[140]; Deliver deliver=null; Submit submit = null; SubmitResp submitresp=null; Bind active=null; Unbind term=null; BindResp resp=null; UnbindResp Unresp=null; so=new Socket("192.168.0.30",8801); out=new DataOutputStream(so.getOutputStream()); input = new DataInputStream(so.getInputStream()); // command=new Bind(399000); // command.SetLoginType(1); // command.SetLoginName("zhao"); // command.SetLoginPassword("zhao"); err=command.write(out);//发送bind if(err!=0) { System.out.println("err"+err); } tmp=sgip.read(input);//接收sgip消息 if(sgip.getCommandID()==SGIP_Command.ID_SGIP_BIND_RESP) { resp=(BindResp)tmp;//强制转换为bindresp resp.readbody();//对消息进行解包 System.out.println(tmp.getSeqno_1()); System.out.println(tmp.getSeqno_2()); System.out.println(tmp.getSeqno_3()); System.out.println(resp.GetResult()); } for(i=0;i<140;i++) { byte_content[i] = 51; i++; byte_content[i] = 51; i++; byte_content[i] = 52; i++; byte_content[i] = 53; i++; byte_content[i] = 54; i++; byte_content[i] = 55; i++; byte_content[i] = 56; i++; byte_content[i] = 57; i++; byte_content[i] = 58; i++; byte_content[i] = 59; } submit = new Submit(399000,//node id同上 "9000",//cp_phone "86",//付费号码 2,//接收短消息的手机数 "86,86",//手机号码前面加86 "99000",//cp_id "",//业务代码 0,//计费类型 "500",//短消息收费值 "500",//赠送话费 1,//代收标志 1,//引起MT的原因 9,//优先级 "",//短消息终止时间 "",//+短消息定时发送时间 1,//状态报告标志 1,//GSM协议类型 1,//GSM协议类型 0,//短消息编码格式 0,//信息类型 12,//短消息长度 "123456789012");//短消息内容 //submit.setContent(0,"123"); /* submit.setBinContent(10,byte_content); // submit=new Submit(399000); submit.setSPNumber("9200"); submit.setChargeNumber("86"); submit.setUserNumber("86,86"); submit.setCorpId("99001"); submit.setServiceType("123"); submit.setFeeType(2); submit.setFeeValue("50000"); submit.setGivenValue("50001"); submit.setAgentFlag(2); submit.setMOrelatetoMTFlag(3); submit.setPriority(8); submit.setExpireTime("+"); submit.setScheduleTime("+"); submit.setReportFlag(0); submit.setTP_pid(1); submit.setTP_udhi(64); submit.setMessageType(1); // submit.setBinContent(10,byte_content); //submit.setContent(0,"1234"); */ /* submit = new Submit(399000,//该构造函数中各个参数的意义同上 "9000", "86", 2, "86,86", "99000", "", 0, "500", "500", 1, 1, 9, "", "", 1, 1, 1, 4, 0, 140, byte_content); */ submit.write(out);//发送submit tmp=sgip.read(input); if(tmp.getCommandID()==SGIP_Command.ID_SGIP_SUBMIT_RESP) { submitresp=(SubmitResp)tmp;//强制转换 submitresp.readbody();//解包 System.out.println(tmp.getSeqno_1()); System.out.println(tmp.getSeqno_2()); System.out.println(tmp.getSeqno_3()); System.out.println(submitresp.getResult()); } //com.write(out); term=new Unbind(399000); term.write(out);//发送unbind tmp=sgip.read(input); if(sgip.getCommandID()==SGIP_Command.ID_SGIP_UNBIND_RESP) { Unresp=(UnbindResp)tmp; System.out.println(tmp.getSeqno_1()); System.out.println(tmp.getSeqno_2()); System.out.println(tmp.getSeqno_3()); } out.close(); so.close(); }catch (SGIP_Exception e){ System.out.println(e.toString()); } catch (Exception e) { System.out.println(e.toString()); } finally { try { System.in.read(); //it just for debug } catch (Exception s) { System.out.println(s.toString()); } } } } 2. MO_TEST import spApi.*; import java.net.*; import java.io.*; public class recv { public static void main(String[] args) { recv atestprocesse=new recv(); } public recv() { ServerSocket serversocket=null; Socket so=null; OutputStream output=null; InputStream input=null; SGIP_Command command=null; try {//一定要捕捉系统异常 serversocket=new ServerSocket(8809); so=serversocket.accept(); input=so.getInputStream(); output=so.getOutputStream(); command=new SGIP_Command(); SGIP_Command tmpCMD=null; Deliver deliver=null; DeliverResp deliverresp = null; Report report=null; ReportResp reportresp=null; Userrpt userrpt = null; UserrptResp userrptresp = null; Bind active=null; Unbind term=null; BindResp resp=null; UnbindResp Unresp=null; boolean loop=true; while(loop) { tmpCMD=command.read(input);//接收sgip消息 switch (command.getCommandID()) { case SGIP_Command.ID_SGIP_BIND : { active=(Bind)tmpCMD;//强制转换 int result=active.readbody();//解包 System.out.println(tmpCMD.getTotalLength()); System.out.println(tmpCMD.getCommandID()); System.out.println(tmpCMD.getSeqno_1()); System.out.println(tmpCMD.getSeqno_2()); System.out.println(tmpCMD.getSeqno_3()); System.out.println(active.GetLoginType()); System.out.println(active.GetLoginName()); System.out.println(active.GetLoginPassword()); resp=new BindResp(399000,//node id 3,CP_id 0);//result resp.write(output); break; } case SGIP_Command.ID_SGIP_UNBIND : { term=(Unbind)tmpCMD;//强制转换 //int result=term.readbody(); System.out.println(tmpCMD.getTotalLength()); System.out.println(tmpCMD.getCommandID()); System.out.println(tmpCMD.getSeqno_1()); System.out.println(tmpCMD.getSeqno_2()); System.out.println(tmpCMD.getSeqno_3()); System.out.println(term.GetFlag()); Unresp=new UnbindResp(399000);//node id 3,CP_id Unresp.write(output); loop=false; break; } case SGIP_Command.ID_SGIP_DELIVER: { deliver=(Deliver)tmpCMD;//强制转换 deliver.readbody();//解包 System.out.println(tmpCMD.getTotalLength()); System.out.println(tmpCMD.getCommandID()); System.out.println(tmpCMD.getSeqno_1()); System.out.println(tmpCMD.getSeqno_2()); System.out.println(tmpCMD.getSeqno_3()); System.out.println(deliver.getUserNumber()); System.out.println(deliver.getSPNumber()); System.out.println(deliver.getTP_pid()); System.out.println(deliver.getTP_udhi()); System.out.println(deliver.getMessageCoding()); System.out.println(deliver.getMessageLength()); System.out.println(deliver.getMessageContent()); deliverresp = new DeliverResp(399000, //node id 3,CP_id 0);//result deliverresp.SetResult(0); deliverresp.write(output); break; } case SGIP_Command.ID_SGIP_REPORT: { report=(Report)tmpCMD;//强制转换 report.readbody();//解包 System.out.println(tmpCMD.getTotalLength()); System.out.println(tmpCMD.getCommandID()); System.out.println(tmpCMD.getSeqno_1()); System.out.println(tmpCMD.getSeqno_2()); System.out.println(tmpCMD.getSeqno_3()); System.out.println(report.getSeq_1()); System.out.println(report.getSeq_2()); System.out.println(report.getSeq_3()); System.out.println(report.getReportType()); System.out.println(report.getUserNumber()); System.out.println(report.getState()); System.out.println(report.getErrorCode()); reportresp = new ReportResp(390999,//node id 3,CP_id 0);//result reportresp.SetResult(0); reportresp.write(output); break; } case SGIP_Command.ID_SGIP_USERRPT: { userrpt=(Userrpt)tmpCMD;//强制转换 userrpt.readbody(); //解包 System.out.println(tmpCMD.getTotalLength()); System.out.println(tmpCMD.getCommandID()); System.out.println(tmpCMD.getSeqno_1()); System.out.println(tmpCMD.getSeqno_2()); System.out.println(tmpCMD.getSeqno_3()); System.out.println(userrpt.getSPNumber()); System.out.println(userrpt.getUserNumber()); System.out.println(userrpt.getUserCondition()); userrptresp= new UserrptResp(390999, 0); userrptresp.SetResult(12); userrptresp.write(output); break; } } } so.close(); } catch (Exception e) { System.out.println(e.toString()); } finally { try { System.in.read(); //it just for debug } catch (Exception s) { System.out.println(s.toString()); } } } } 五. 附录: GSM03.40中9.2.3.9的内容: 9.2.3.9 TP-Protocol-Identifier (TP-PID) The TP-Protocol-Identifier parameter serves the purposes indicated in subclause 3.2.3. It consists of one octet, and the bits in the octet are used as follows: The MS shall interpret reserved or unsupported values as the value 00000000 but shall store them exactly as received. The SC may reject messages with a TP-Protocol-Identifier containing a reserved value or one which is not supported. bits usage 7 6 0 0 Assigns bits 0..5 as defined below 0 1 Assigns bits 0..5 as defined below 1 0 reserved 1 1 Assigns bits 0-5 for SC specific use In the case where bit 7 = 0 and bit 6 = 0, bit 5 indicates telematic interworking: value = 0 : no interworking, but SME-to-SME protocol value = 1 : telematic interworking In the case of telematic interworking, the following five bit patterns in bits 4..0 are used to indicate different types of telematic devices: 4.. .0 00000 implicit - device type is specific to this SC, or can be concluded on the basis of the address 00001 telex (or teletex reduced to telex format) 00010 group 3 telefax 00011 group 4 telefax 00100 voice telephone (i.e. conversion to speech) 00101 ERMES (European Radio Messaging System) 00110 National Paging system (known to the SC) 00111 Videotex (T.100 [20] /T.101 [21]) 01000 teletex, carrier unspecified 01001 teletex, in PSPDN 01010 teletex, in CSPDN 01011 teletex, in analog PSTN 01100 teletex, in digital ISDN 01101 UCI (Universal Computer Interface, ETSI DE/PS 3 01-3) 01110..01111 (reserved, 2 combinations) 10000 a message handling facility (known to the SC) 10001 any public X.400-based message handling system 10010 Internet Electronic Mail 10011..10111 (reserved, 5 combinations) 11000..11110 values specific to each SC, usage based on mutual agreement between the SME and the SC (7 combinations available for each SC) 11111 A GSM/UMTS mobile station. The SC converts the SM from the received TP-Data-Coding-Scheme to any data coding scheme supported by that MS (e.g. the default). If bit 5 has value 1 in an SMS-SUBMIT PDU, it indicates that the SME is a telematic device of a type which is indicated in bits 4..0, and requests the SC to convert the SM into a form suited for that device type. If the destination network is ISDN, the SC must also select the proper service indicators for connecting to a device of that type. If bit 5 has value 1 in an SMS-DELIVER PDU, it indicates that the SME is a telematic device of a type which is indicated in bits 4..0. If bit 5 has value 0 in an SMS-DELIVER PDU, the value in bits 4..0 identifies the SM-AL protocol being used between the SME and the MS. Note that for the straightforward case of simple MS-to-SC short message transfer the Protocol Identifier is set to the value 0. In the case where bit 7 = 0, bit 6 = 1, bits 5..0 are used as defined below 5 .. . .0 000000 Short Message Type 0 000001 Replace Short Message Type 1 000010 Replace Short Message Type 2 000011 Replace Short Message Type 3 000100 Replace Short Message Type 4 000101 Replace Short Message Type 5 000110 Replace Short Message Type 6 000111 Replace Short Message Type 7 001000..011101 Reserved 011110 Enhanced Message Service (EMS. Refer subclause 3.10) 001000..011110 Reserved 011111 Return Call Message 100000..111011 Reserved 111100 ANSI-136 R-DATA 111101 ME Data download 111110 ME De-personalization Short Message 111111 (U)SIM Data download A short message type 0 indicates that the ME must acknowledge receipt of the short message but may discard its contents. The Replace Short Message feature is optional for the ME and the (U)SIM but if implemented it shall be performed as described here. For MT short messages, on receipt of a short message from the SC, the MS shall check to see if the associated Protocol Identifier contains a Replace Short Message Type code. If such a code is present, then the MS shall check the originating address and replace any existing stored message having the same Protocol Identifier code and originating address with the new short message and other parameter values. If there is no message to be replaced, the MS shall store the message in the normal way. The MS may also check the SC address as well as the Originating Address. However, in a network which has multiple SCs, it is possible for a Replace Message type for a SM to be sent via different SCs and so it is recommended that the SC address should not be checked by the MS unless the application specifically requires such a check. If a Replace Short Message Type code is not present then the MS shall store the message in the normal way. In MO short messages the SC reacts similarly but only the address of the originating MS or any other source is checked. The Enhanced Message Service PID value shall be set in a MO enhanced short message unless there is a need to set the PID to any other value (e.g. for telematic interworking). In the event where the message contains one or more IE that could not be understood by the receiving SME, this PID value may be used to assist the receiving SME and/or the SMSC to identify such a message (e.g. for diagnostic purposes). It is not a mandatory requirement for the SMSC or receiving SME to process this PID value or for the SMSC to pass the value to the receiving SME. A Return Call Message indicates to the MS to inform the user that a call (e.g. a telephone call) can be established to the address specified within the TP-OA. The RP-OA contains the address of the SC as usual. The message content (if present) gives displayable information (e.g. the number of waiting voice messages). The message is handled in the same way as all other messages of the Replace Short Message Types. The ME De-personalization Short Message is a ME-specific message which instructs the ME to de-personalities the ME (see 3G TS 22.022 [25]). The TP-DCS shall be set to Uncompressed, Default Alphabet, and Message Class 1 (ME-specific), which corresponds to a bit coding of 00010001. The TP-UD field contains de-personalization information coded according to 3G TS 22.022 [25]. This information shall not be displayed by an ME which supports the scheme. The acknowledgement to this message is a SMS-DELIVER-REPORT for RP-ACK in which the TP-User-Data shall be coded according to 3G TS 22.022 [25]. (U)SIM Data download is a facility whereby the ME must pass the short message in its entirety including all SMS elements contained in the SMS deliver to the (U)SIM using the mechanism described in GSM TS 11.11 [16] and 3G TS 31.102 [30]. The DCS shall be set to 8 bit message class 2 (either bit coding 1111 0110 or 00010110). The entire user data field is available for (U)SIM Data download. If the DCS is not set to 8-bit message class 2 then the message shall be handled in the normal way by the ME. ME Data download is a facility whereby the ME shall process the short message in its entirety including all SMS elements contained in the SMS deliver to the ME. The DCS should normally be set to message class 1. If the DCS is set to message class 1 and no application in the ME exists, which is able to process the short message, the ME may discard the short message. The entire user data field is available for ME data download. The TPDU parameters required for the SMS-DELIVER should be passed transparently by all involved SCs, so no TPDU parameter in the entire short message is modified, other than the changes required to convert an SMS-SUBMIT into an SMS-DELIVER. ANSI-136 R-DATA is a facility whereby the ME must pass the short message in its entirety, including all elements contained in the SMS DELIVER, to the (U)SIM using the mechanism described in GSM TS 11.14 [16] and 3G TS 31.102 [30]. The DCS shall be set to 8-bit message class 2 (either bit coding 11110110 or 00010110). If the DCS is not set to 8-bit message class 2 then the message shall be handled in the normal way by the ME. GSM03.40中9.2.3.23的内容: 9.2.3.23 TP-User-Data-Header-Indicator (TP-UDHI) The TP-User-Data-Header-Indicator is a 1 bit field within bit 6 of the first octet of the following six PDUs: - SMS-SUBMIT, - SMS-SUBMIT-REPORT, - SMS-DELIVER, - SMS-DELIVER-REPORT, - SMS-STATUS-REPORT, - SMS-COMMAND. TP-UDHI has the following values. Bit no. 6 0 The TP-UD field contains only the short message 1 The beginning of the TP-UD field contains a Header in addition to the short message 六. SGIP CommandID 消息ID名称 消息ID取值 SGIP_BIND 0x1 SGIP_BIND_RESP 0x80000001 SGIP_UNBIND 0x2 SGIP_UNBIND_RESP 0x80000002 SGIP_SUBMIT 0x3 SGIP_SUBMIT_RESP 0x80000003 SGIP_DELIVER 0x4 SGIP_DELIVER_RESP 0x80000004 SGIP_REPORT 0x5 SGIP_REPORT_RESP 0x80000005 SGIP_ADDSP 0x6 SGIP_ADDSP_RESP 0x80000006 SGIP_MODIFYSP 0x7 SGIP_MODIFYSP_RESP 0x80000007 SGIP_DELETESP 0x8 SGIP_DELETESP_RESP 0x80000008 SGIP_QUERYROUTE 0x9 SGIP_QUERYROUTE_RESP 0x80000009 SGIP_ADDTELESEG 0xa SGIP_ADDTELESEG_RESP 0x8000000a SGIP_MODIFYTELESEG 0xb SGIP_MODIFYTELESEG_RESP 0x8000000b SGIP_DELETETELESEG 0xc SGIP_DELETETELESEG_RESP 0x8000000c SGIP_ADDSMG 0xd SGIP_ADDSMG_RESP 0x8000000d SGIP_MODIFYSMG 0xe SGIP_MODIFYSMG_RESP 0x0000000e SGIP_DELETESMG 0xf SGIP_DELETESMG_RESP 0x8000000f SGIP_CHECKUSER 0x10 SGIP_CHECKUSER_RESP 0x80000010 SGIP_USERRPT 0x11 SGIP_USERRPT_RESP 0x80000011 SGIP_TRACE 0x1000 SGIP_TRACE_RESP 0x80001000
/
本文档为【精品短信发送API】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索