简单易操作的DELPHI短信验证码接口demo

DELPHI对接验证码短信接口DEMO示例

//接口类型:互亿无线触发短信接口,支持发送验证码短信、订单通知短信等。//账户注册:请通过该地址开通账户 http://user.ihuyi.com/?DKimmu//注意事项://(1)调试期间,请使用用系统默认的短信内容:您的验证码是:【变量】。请不要把验证码泄露给其他人。//(2)请使用 用户名 及 APIkey来调用接口,APIkey在会员中心可以获取;//(3)该代码仅供接入互亿无线短信接口参考使用,客户可根据实际需要自行编写;// ************************************************************************ //// The types declared in this file were generated from data read from the// WSDL File described below:// WSDL : http://106.ihuyi.com/webservice/sms.php?wsdl// >Import : http://106.ihuyi.com/webservice/sms.php?wsdl:0// Encoding : utf-8// Version : 1.0// (2013/11/26 10:37:24 – – $Rev: 10138 $)// ************************************************************************ //unit sms;interfaceuses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;const IS_OPTN = $0001; IS_REF = $0080;type // ************************************************************************ // // The following types, referred to in the WSDL document are not being represented // in this file. They are either aliases[@] of other types represented or were referred // to but never[!] declared in the document. The types from the latter category // typically map to predefined/known XML or Borland types; however, they could also // indicate incorrect WSDL documents that failed to declare or import a schema type. // ************************************************************************ // // !:int – “http://www.w3.org/2001/XMLSchema”[Gbl] // !:string – “http://www.w3.org/2001/XMLSchema”[Gbl] // !:srting – “http://www.w3.org/2001/XMLSchema”[Gbl] SubmitResult = class; { “http://106.ihuyi.com/”[GblCplx] } ChangePasswordResult = class; { “http://106.ihuyi.com/”[GblCplx] } GetNumResult = class; { “http://106.ihuyi.com/”[GblCplx] } VersionInfoResult = class; { “http://106.ihuyi.com/”[GblCplx] } // ************************************************************************ // // XML : SubmitResult, global, // Namespace : http://106.ihuyi.com/ // ************************************************************************ // SubmitResult = class(TRemotable) private Fcode: Integer; Fmsg: WideString; Fsmsid: Integer; published property code: Integer read Fcode write Fcode; property msg: WideString read Fmsg write Fmsg; property smsid: Integer read Fsmsid write Fsmsid; end; // ************************************************************************ // // XML : ChangePasswordResult, global, // Namespace : http://106.ihuyi.com/ // ************************************************************************ // ChangePasswordResult = class(TRemotable) private Fcode: Integer; Fmsg: WideString; published property code: Integer read Fcode write Fcode; property msg: WideString read Fmsg write Fmsg; end; // ************************************************************************ // // XML : GetNumResult, global, // Namespace : http://106.ihuyi.com/ // ************************************************************************ // GetNumResult = class(TRemotable) private Fcode: Integer; Fmsg: WideString; Fnum: Integer; published property code: Integer read Fcode write Fcode; property msg: WideString read Fmsg write Fmsg; property num: Integer read Fnum write Fnum; end; // ************************************************************************ // // XML : VersionInfoResult, global, // Namespace : http://106.ihuyi.com/ // ************************************************************************ // VersionInfoResult = class(TRemotable) private Fmsg: WideString; published property msg: WideString read Fmsg write Fmsg; end; // ************************************************************************ // // Namespace : http://106.ihuyi.com/ // soapAction: http://106.ihuyi.com/%operationName% // transport : http://schemas.xmlsoap.org/soap/http // style : document // binding : smsSoap // service : sms // port : smsSoap // URL : http://106.ihuyi.com/webservice/sms.php?smsService // ************************************************************************ // smsSoap = interface(IInvokable) [‘{228902AE-4B53-39C9-05CA-F389FEE82174}’] function Submit(const account: WideString; const password: WideString; const mobile: WideString; const content: WideString): SubmitResult; stdcall; function ChangePassword(const account: WideString; const password: WideString; const newpassword: WideString): ChangePasswordResult; stdcall; function GetNum(const account: WideString; const password: WideString): GetNumResult; stdcall; function VersionInfo: VersionInfoResult; stdcall; end;function GetsmsSoap(UseWSDL: Boolean=System.False; Addr: string=”; HTTPRIO: THTTPRIO = nil): smsSoap;implementation uses SysUtils;function GetsmsSoap(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): smsSoap;const defWSDL = ‘http://106.ihuyi.com/webservice/sms.php?wsdl’; defURL = ‘http://106.ihuyi.com/webservice/sms.php?smsService’; defSvc = ‘sms’; defPrt = ‘smsSoap’;var RIO: THTTPRIO;begin Result := nil; if (Addr = ”) then begin if UseWSDL then Addr := defWSDL else Addr := defURL; end; if HTTPRIO = nil then RIO := THTTPRIO.Create(nil) else RIO := HTTPRIO; try Result := (RIO as smsSoap); if UseWSDL then begin RIO.WSDLLocation := Addr; RIO.Service := defSvc; RIO.Port := defPrt; end else RIO.URL := Addr; finally if (Result = nil) and (HTTPRIO = nil) then RIO.Free; end;end;initialization InvRegistry.RegisterInterface(TypeInfo(smsSoap), ‘http://106.ihuyi.com/’, ‘utf-8’); InvRegistry.RegisterDefaultSOAPAction(TypeInfo(smsSoap), ‘http://106.ihuyi.com/%operationName%’); InvRegistry.RegisterInvokeOptions(TypeInfo(smsSoap), ioDocument); RemClassRegistry.RegisterXSClass(SubmitResult, ‘http://106.ihuyi.com/’, ‘SubmitResult’); RemClassRegistry.RegisterXSClass(ChangePasswordResult, ‘http://106.ihuyi.com/’, ‘ChangePasswordResult’); RemClassRegistry.RegisterXSClass(GetNumResult, ‘http://106.ihuyi.com/’, ‘GetNumResult’); RemClassRegistry.RegisterXSClass(VersionInfoResult, ‘http://106.ihuyi.com/’, ‘VersionInfoResult’);end.

郑重声明:本文内容及图片均整理自互联网,不代表本站立场,版权归原作者所有,如有侵权请联系管理员(admin#wlmqw.com)删除。
(0)
用户投稿
上一篇 2022年7月8日
下一篇 2022年7月8日

相关推荐

  • 《Ex-Zodiac》体验报告:简单上手的复古风清版轨道射击游戏

    欢迎关注,获取更多游戏评测资讯,入手与否不再犹豫~喜欢的不妨点个赞唷(๑• ㅂ• )و 《Ex-Zodiac》是由MNKY制作Pixeljam于Steam上发行的一款复古风格清版轨…

    2022年7月30日
  • 四人赛首题两个选项过于简单需放弃

    这个月的四人赛形势还算是不错的,到今天总共丢了4分。这与自己之前一个个来对比,算是丢的最少的。从目前的形势下去,这个月应该会得一个丢分最少的良好成绩。 今天的四人赛是这个月以来观战…

    2022年8月19日
  • 什么蓝牙耳机好?数码小编分享五大热门蓝牙耳机品牌

    手机取消传统耳机接接口后,蓝牙耳机成为了我们的首选,逐渐取代有线耳机。小编近期也收到了很多反馈,希望我能分享一些值得入手的蓝牙耳机,聊聊什么蓝牙耳机好。今天,我打算盘点目前各大平台…

    2022年7月27日
  • 山里是个简单的世界

    山,是什么总能吸引这么多人? 或许山中有诗,山中有景。 也许是山里有灵气,仁者爱山。 山是真实的,它真实而直接,让人看到最自然的景, 让你发现这就是既简单又具体。 走进大山,慢慢被…

    2022年8月8日
  • “咆哮式”直播带货让人反感

    今天是6月18日,据说是什么“电商好物节”,各大平台又在狂推网红直播带货,你一个不小心就会点开一个带货直播间,如果你想了解一下这种特别流行的销售方式,请一定要先做好心理准备,因为大…

    2022年6月20日
  • 全球经济面临危机!形势远比想象的更严峻?

    形势远比想象的更严峻,最长放假到2023年 当前市场形势异常严峻,整个行业进入了一个普遍亏损的周期,形势远比想象的要恶劣。为什么? 核心问题其实就是八个字:需求减少,产量增加! 有…

    2022年8月1日
  • Epic出新游戏了《Rumbleverse》中文名摔角城大乱斗

    这是我玩了几局之后的感受和一些操作方面的介绍,一款像堡垒之夜的画风,是一个40人大乱斗的吃鸡免费游戏,很像外国版的永劫无间但是操作会比较简单易懂。 玩家需要在落地之后打碎箱子获得技…

    2022年8月14日
  • 处理接口幂等性的两种常见方案

    在上周发布的 TienChin 项目视频中,我和大家一共梳理了六种幂等性解决方案,接口幂等性处理算是一个非常常见的需求了,我们在很多项目中其实都会遇到。今天我们来看看两种比较简单的…

    2022年6月21日
  • 大s老公这样操作 粉丝们看了有点心寒,质疑他结婚是否另有目的

    这样的爱情是真爱吗?大s老公把大s当成摇钱树?为了吸引客人来吃饭,大厅里竟然贴满了他妻子的照片,厕所里也贴满了。 的确,经历了那么多闹剧,我依然保持着自己的初心和对爱的渴望。大s的…

    2022年6月13日
  • 玩溜早餐荟|北京市文旅局发布自驾游出行提示;携程暑期租车自驾游订单量已赶超去年

    1.北京市文旅局发布自驾游出行提示 北京市文旅局发布自驾游出行提示,提示游客遵守进返京政策。应通过权威渠道了解最新防疫政策,严格遵守各项疫情防控规定。游客出游前和自驾游行程中要认真…

    2022年8月11日

联系我们

联系邮箱:admin#wlmqw.com
工作时间:周一至周五,10:30-18:30,节假日休息