isag webservice axis
来源:互联网 发布:hl中走丝系统编程 编辑:程序博客网 时间:2024/06/05 15:42
上上周和赵工调试了isag的发送短信的接口。
总共实现了几个功能:
1、通过页面向notification发送消息,桩作为客户端
2、作为服务端,接收send接口、receive接口的消息,并正确返回响应
3、支持多线程向notification接口发送消息,线程数、时间间隔在web.xml中配置
第一次使用到webService和电信的isag接口,觉得有必要总结一下
1.如何调用接口
SmsNotificationServiceLocator snsl = new SmsNotificationServiceLocator();
SmsNotification sn = snsl.getSmsNotification(url);
2.添加soapheader和解析soapheader
isag的soapheader分为两个RequestSOAPHeader(下行)和NotifySOAPHeader(上行)。
客户端使用RoutSOAPHeader类来初始化下行header和上行header。
服务端使用DecodeSOAPHeader类来解析上下行header。
3.如何获得notifysmsdeliverystatus的deliverystatus对象
deliverystatus的构造函数是protected,要想获得其对象,调用其两个静态函数,其实最终还是调用的静态函数formValue(String value)
4.messagecontext
要想获得soapheader,HttpServletRequest 或者httpresponse对象,都需要先获得messagecontext对象
//获得messagecontext对象
MessageContext context = MessageContext.getCurrentContext();
//获得SOAPEnvelope 对象以及SOAPHeaderElement
SOAPEnvelope requestEnvelope = context.getRequestMessage().getSOAPEnvelope();
SOAPHeaderElement requestSequenceIdHeader = requestEnvelope.getHeaderByName(
"http://www.chinatelecom.com.cn/schema/ctcc/common/v2_1", "RequestSOAPHeader");
接下来可以调用decodesoapheader来解析其元素了
//获得HttpServletRequest 对象
HttpServletRequest request = (HttpServletRequest) context.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
//获得HttpServletResponse 对象
HttpServletResponse response = (HttpServletResponse)context.getProperty(HTTPConstants.MC_HTTP_SERVLETRESPONSE);
- isag webservice axis
- ISAG webservice接口发送彩信附件
- webservice axis
- WebService Axis
- axis+webservice
- WebService AXIS
- axis webservice
- webservice-axis
- axis webservice
- WebService、Axis
- AXIS WebService
- 使用axis部署webservice
- Axis开发webservice
- Apache Axis部署 WebService
- 使用Axis开发WebService
- 用AXIS开发WEBSERVICE
- axis开发webservice(1)
- axis开发webservice(2)
- “/r/n”回车与换行
- VolumeParticle(1)
- how to use the CAknwaitDialog
- 11
- 匈牙利 规范
- isag webservice axis
- 面向 OLTP 应用程序的重要 SQL Server 2005 性能问题
- Introduction
- 网页小 Widget 应用之 extjs.com 特效介绍篇
- 解析KML文件,得到编码折线(以字符串形式表示)
- CST脚本语言的设计【3】适用范围
- 构建大型关系数据仓库的十大最佳实践
- Target Audience, Assumptions, and Recommendations
- FastReport.Net C#程序邦定报表模版