SMGP 3.0 Java API

webphp 12年前
     <p>SMGP协议是中国电信为短信增值业务指定的接口协议,协议在在 SMPP协议基础上进行扩展,扩展了相关计费和鉴权信息。目前 SMGP协议有1.0,2.0,3.0三个版本的协议。1.0协议目前基本上停用,而2.0目前在部分省小灵通接入仍然在使用。3.0协议时目前最新的协 议,相比2.0协议主要增加了tlv可选字段。</p>    <p>该项目主要针对SMGP 3.0协议进行开发。</p>    <p>程序使用JAVA开发。</p>    <p>示例代码:</p>    <pre class="brush:java; toolbar: true; auto-links: false;">//Client("服务器ip地址","服务器端口号",LoginMode,"账号","密码","企业代码",显示模式) Client client = new Client("189.189.189.189", 8890, 2, "account","password", "12100001", 0); Result result = client.Login(); System.out.println("ErrorCode:"+result.ErrorCode); System.out.println("ErrorDescription:"+result.ErrorDescription); //Client("服务器ip地址","服务器端口号",LoginMode,"账号","密码","企业代码",显示模式) Client client = new Client("189.189.189.189", 8890, 2, "account","password", "12100001", 0); //submit("主叫号码","被叫号码","内容","产品编号") Submit submit = new Submit("10620068", "18967441118", "你好!","112000000000061090527");  Result result = client.Send(submit); System.out.println("ErrorCode:"+result.ErrorCode); System.out.println("MsgID:"+result.ErrorDescription);</pre>    <p><strong>项目主页:</strong><a href="http://www.open-open.com/lib/view/home/1326020121328" target="_blank">http://www.open-open.com/lib/view/home/1326020121328</a></p>    <p></p>