[精选]电信增值业务及软件开发实践报告

上传人:庄** 文档编号:173949612 上传时间:2021-03-15 格式:DOCX 页数:32 大小:1.67MB
返回 下载 相关 举报
[精选]电信增值业务及软件开发实践报告_第1页
第1页 / 共32页
[精选]电信增值业务及软件开发实践报告_第2页
第2页 / 共32页
[精选]电信增值业务及软件开发实践报告_第3页
第3页 / 共32页
[精选]电信增值业务及软件开发实践报告_第4页
第4页 / 共32页
[精选]电信增值业务及软件开发实践报告_第5页
第5页 / 共32页
点击查看更多>>
资源描述

《[精选]电信增值业务及软件开发实践报告》由会员分享,可在线阅读,更多相关《[精选]电信增值业务及软件开发实践报告(32页珍藏版)》请在金锄头文库上搜索。

1、电信增值业务及软件开发一实践报告学 院: 软件学院 专 业: 软件工程 班 级: 学 号: 姓 名2: 指导老师: 20一三年 06月 22日实验一:短消息MO指令匹配算法一、 实验步骤及实验结果实验代码:#include#includevoid main()char S100;char T50; cinS;cinT;int len1,len2;int len;int next100;int i,j;int k;int count=0;len1=strlen(S); len2=strlen(T);len=len1-len2;j=1,k=0;next1=0;while(jlen2) if(k=0

2、|Tj-1=Tk-1)j+;k+;nextj=k;else k=nextk;i=0;j=0;while(j!=len2&ilen1)count+; if(Si!=Tj) if(j=0) i+; elsej=nextj+1-1;elsei+; j+; coutlen1endl;coutiendl;coutjendl;if(j=len2) cout匹配成功,初始匹配成功的位置为第:i-len2+1个字符endl;cout匹配次数为:countendl;elsecout匹配次数为:countendl;cout匹配失败endl;二、实验截图:二、 心得:通过这次实验,用C/C+/C#或Java编程实现

3、短消息MO指令匹配算法,该算法能够实现短消息MO指令的长号码和指令内容的模糊和精确匹配、空指令匹配功能。实验二:短消息增值业务软件开发平台及接口一、实验步骤及实验结果( 1 )实验内容“根据短信增值业务软件开发平台的操作手册熟悉短信增值业务软件开发平台”的实验步骤如下:登陆短信增值业务平台x172.22.1一八.16:8081/sms/创建一个属于自己的业务,按需求和格式定义业务名称、指令类型、匹配方式、资费、处理方式、通道并送发审核。实验结果 短信成功接收到,并且程序返回值为“0”结果分析通过平台下发的测试短信最终预期收到。说明在平台上创建的业务通道,格式正确。并且已经通过管理员的审核,能够

4、合法的使用平台提供的通道资源。测试代码的发送成功还说明在程序中调用平台接口的方式是正确的。( 2 )实验内容“根据短消息增值业务软件开发平台的接口手册,熟悉短消息增值业务软件开发平台的HTTP接口、API接口、Web Service接口等的使用方法”的实验步骤如下:http接口的参数定义格式:在程序中调用已通过审核的业务String url = x172.22.1一八.16:8081/sms/http/SendSms;/ 读取接口传递过来的参数并封装数据RequestData rd = new RequestData();rd.setPhone(一五923932303);rd.setServi

5、ceId(2);rd.setChannelId(1);rd.setDestNumber(1);rd.setLinkId();rd.setMoId();rd.setSpNumber();rd.setFunctionType();rd.setType();通过程序来实现短信的下发代码实现:MainClass.javapackage com.cqupt.http;public class MainClass String phone = ;public MainClass() String mtMsg = ;String commString = ;String url = x172.22.1一八.

6、16:8081/sms/http/SendSms;/ 读取接口传递过来的参数并封装数据RequestData rd = new RequestData();rd.setPhone(一五923932303);rd.setServiceId(2);rd.setChannelId(1);rd.setDestNumber(1);rd.setLinkId();rd.setMoId();rd.setSpNumber();rd.setFunctionType();rd.setType();/ 业务逻辑判断mtMsg = 第二条测试信息;rd.setMtMsg(mtMsg);/ 拼接数据commString

7、= RequestUtil.getInstance()xmString(rd);/ 转发到重邮平台RequestUtil.getInstance().requestURL(commString, url);public static void main(String args) MainClass mainClass = new MainClass();RequestData.javapackage com.cqupt.http;public class RequestData private String phone;private String destNumber;private Str

8、ing serviceId;private String channelId;private String linkId;private String moId;private String spNumber;private String functionType;private String type;private String content;private String mtMsg;public String getPhone() return phone;public void setPhone(String phone) this.phone = phone;public Stri

9、ng getDestNumber() return destNumber;public void setDestNumber(String destNumber) this.destNumber = destNumber;public String getServiceId() return serviceId;public void setServiceId(String serviceId) this.serviceId = serviceId;public String getChannelId() return channelId;public void setChannelId(St

10、ring channelId) this.channelId = channelId;public String getLinkId() return linkId;public void setLinkId(String linkId) this.linkId = linkId;public String getMoId() return moId;public void setMoId(String moId) this.moId = moId;public String getSpNumber() return spNumber;public void setSpNumber(Strin

11、g spNumber) this.spNumber = spNumber;public String getFunctionType() return functionType;public void setFunctionType(String functionType) this.functionType = functionType;public String getType() return type;public void setType(String type) this.type = type;public String getContent() return content;p

12、ublic void setContent(String content) this.content = content;public String getMtMsg() return mtMsg;public void setMtMsg(String mtMsg) this.mtMsg = mtMsg;RequestUtil.javapackage com.cqupt.http;import java.io.BufferedReader;import java.io.InputStreamReader;import java.io.OutputStream;import java.io.UnsupportedEncodingException;import .HttpURLConnection;import .URL;import .URLEncoder;public class RequestUtil private RequestUtil() private static RequestUtil requestUtil = null;/* * 单例模式,返回RequestUtil的实例化对象 * *

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 其它文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号