企业信息机api接口说明

上传人:第*** 文档编号:32743684 上传时间:2018-02-12 格式:DOC 页数:29 大小:266.50KB
返回 下载 相关 举报
企业信息机api接口说明_第1页
第1页 / 共29页
企业信息机api接口说明_第2页
第2页 / 共29页
企业信息机api接口说明_第3页
第3页 / 共29页
企业信息机api接口说明_第4页
第4页 / 共29页
企业信息机api接口说明_第5页
第5页 / 共29页
点击查看更多>>
资源描述

《企业信息机api接口说明》由会员分享,可在线阅读,更多相关《企业信息机api接口说明(29页珍藏版)》请在金锄头文库上搜索。

1、华为技术有限公司 企业信息机 API 接口说明 (V1.1for V4.1D412)为了企业用户更加简便同时又灵活地实现与短信相关的业务,我们提供了一个企业业务系统接入华为公司短信平台的应用程序开发接口库。该接口库以 JAVA 方式提供给企业应用系统进行调用。通过调用该接口库的方法可以实现短信的单条发送、上行短信查询、返回短信 id、根据 id 得到短信状态等功能。使用该 API 时请注意以下几点:1.不再需要systemConfig.txt这个文件2.如果你需要记录日志,请将log4j.properties文件放到程序运行当前路径下, 并在log4j中配置你存放的日志文件路径3.如果你不需要

2、记录日志,只需要删除log4j.properties即可第 1 章 结构及描述:smentry.jar :Java APIcom.huawei.api:包路径com.huawei.api.SMErrorMapping; :定义接口异常类型及参考信息com.huawei.api.SMException;:接口异常类com.huawei.api.SMEntry; :直接操作信息机接口 com.huawei.api.SMReceivedBean;:上行短信对象类com.huawei.api. SendShorBean;:下行短信对象类com.huawei.api.SMTools;:工具类com.hu

3、awei.api.ConnectionMgr;:连接 DB 类在应用中,通过直接调用 SMEntry 类的方法实现 api 接口功能;通过捕获 SMException 异常得到出错信息;华为技术有限公司 第 2 章 详细说明:2.1 SMErrorMapping 及 SMException 类;捕获异常信息:trySMEntry.methods ( );catch(SMException e)e.getErrorType(); / 异常类型e.getErrorCode(); / 异常代码e.getErrorDesc(); / 异常描述异常类型Type(String类型)异常代码Code(Str

4、ing 类型)异常描述 Desc(String 类型) 说明1000 Interface Initialize Failed(接口初始化失败)There is an exception while loading database driver加载数据库驱动程序发生异常10001 Interface Initialize Failed(接口初始化失败)There is an exception whilereading configurable file读取配置文件发生异常!1001 Interface Initialize Failed(接口初始化失败)Invalid database, u

5、ser name or password!数据库服务器名称,用户名或者密码不正确!1002 Failed to operate database (接口初始化失败)Initialize Interface Before Calling Other Methods调用其它函数时必须先初始化接口1003 Failed to operate databases (数据库操作失败)Failed Insert Short Message 新增短信失败1004 Failed to operate databases (数据库操作失败)Failed Delete MO Message 删除上行短信失败华为技

6、术有限公司 1005 Parameter Invalid (参数非法)Parameter Invalid 调用函数时提供的参数不符合规范100501 Parameter Invalid (参数非法)Invalid Time Parameter 时间参数(atTime) 异常非(null)100502 Parameter Invalid (参数非法)Unsend Short Message source Address parameter Exception待发送短信的源地址参数(sourceAddr)异常非 null, 非 trim().”,长度不能大于 21100503 Parameter

7、Invalid (参数非法)Unsend Short Message Destination Address Parameter Exception 待发送短信的目的地址参数(destAddr)异常非 null, 非 trim().”,长度不能大于 21100504 Parameter Invalid (参数非法)Batch Multiple Send File Name Parameter Exception批量群发文件名参数(destAddrFiles)异常完整路径及文件名100505 Parameter Invalid (参数非法)Short Message Content Parame

8、ter Exception 短信内容参数(content)异常非 null, 非 trim().”,长度不能大于 160,不能含有禁止语句100506 Parameter Invalid (参数非法)Status Report Parameter Exception状态报告参数(needStateReport)异常0 或 1100507 Parameter Invalid Service Type Parameter 业务类型参数华为技术有限公司 (参数非法) Exception (serviceID)异常长度不能大于 10100508 Parameter Invalid (参数非法)Fee

9、Type Parameter Exception 资费类型参数(feeType)异常长度不能大于 2100509 Parameter Invalid (参数非法)Fee Code Parameter Exception资费代码参数(feeCode)异常长度不能大于 6100510 Parameter Invalid (参数非法)Destination Address Parameter Exception 目的地址参数(destAddrs)异常查询上行短信参数,非 null , 非 trim().”,长度不能大于 21100511 Parameter Invalid (参数非法)Time Pa

10、rameter Exception 时间参数异常100512 Parameter Invalid (参数非法)User Account (Operator_ID) Parameter Exception用户账号(Operator_ID)参数异常最大 20 位,不能为空100513 Parameter Invalid (参数非法)User Code Parameter Exception 用户代码(Operator_Code)参数异常最大 20 位,不能为空100514 Parameter Invalid (参数非法)User Name Parameter Exception 用户名称(Oper

11、ator_Name)参数异常华为技术有限公司 100515 Parameter Invalid (参数非法)User Password Parameter Exception用户密码(Password)参数异常最大 32 位,不能为空100516 Parameter Invalid (参数非法)User Type Parameter Exception 用户类型(OperatorType)参数异常只能为 0 或 10 表示超级用户,1表示普通用户100517 Parameter Invalid (参数非法)Send The Ordinary Short Message Authorizatio

12、n Parameter Exception发送普通短信权限(SMSendRight)参数异常只能为 0 或 10 表示没有该权限,1 表示有该权限100518 Parameter Invalid (参数非法)Multiple Send Short Message Authorization Parameter Exception发送群发短信权限(MultiSendRight)参数异常只能为 0 或 10 表示没有该权限,1 表示有该权限100519 Parameter Invalid (参数非法)Send The Point To Point Short Message Authorizati

13、on Parameter Exception 发送点点通短信权限(perTOper)参数异常只能为 0 或 10 表示没有该权限,1 表示有该权限100520 Parameter Invalid The Amount Of Send Short Message Authorization Parameter 发送短信数量权限华为技术有限公司 (参数非法) Exception (LimitType)参数异常只能为 0,1,2,0 代表不限制,1 代表按天,2 代表按月100521 Parameter Invalid (参数非法)The Amount Of Max Send Short Messa

14、ge Parameter Exception 最大发送短信数量(MaxCount)参数异常该用户最大的下发短信数量100522 Parameter Invalid (参数非法)Identifier Flag Parameter Exception标识位(Modified)参数异常只能为 11006 Failed to operate databases (数据库操作失败)Failed Insert User! 新增用户失败10061 Failed to operate databases (数据库操作失败)Failed Modify User! 修改用户失败10062 Failed to operat

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

当前位置:首页 > 建筑/环境 > 工程造价

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