ASP.net通过http调用验证码短信接口源码
2015-03-11 18:09
671 查看
通过验证码短信http调用接口,您可以很快速的在网站或者app中集成手机号验证功能,该源码只是核心代码,具体可以根据您的实际需求进行扩展。
该DEMO是ASP.net通过http调用验证码短信接口源码;
自助申请帐户地址:http://www.ihuyi.com/product.php
完整接口文件地址:http://www.ihuyi.com/upload/file/cu-fa-jie-kou.rar
该DEMO是ASP.net通过http调用验证码短信接口源码;
using System; using System.ComponentModel; using System.Diagnostics; using System.Web.Services; using System.Web.Services.Protocols; using System.Xml.Serialization; /// <remarks/> [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.1")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Web.Services.WebServiceBindingAttribute(Name = "smsSoap", Namespace = "http://106.ihuyi.com/")] public partial class sms : System.Web.Services.Protocols.SoapHttpClientProtocol { private System.Threading.SendOrPostCallback SubmitOperationCompleted; /// <remarks/> public sms() { this.Url = "http://106.ihuyi.com/webservice/sms.php?smsService"; } /// <remarks/> public event SubmitCompletedEventHandler SubmitCompleted; /// <remarks/> [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.xmlsoap.org/Submit", RequestNamespace = "http://106.ihuyi.com/", ResponseNamespace = "http://106.ihuyi.com/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public SubmitResult Submit(string account, string password, string mobile, string content) { object[] results = this.Invoke("Submit", new object[] { account, password, mobile, content}); return ((SubmitResult)(results[0])); } /// <remarks/> public System.IAsyncResult BeginSubmit(string account, string password, string mobile, string content, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("Submit", new object[] { account, password, mobile, content}, callback, asyncState); } /// <remarks/> public SubmitResult EndSubmit(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((SubmitResult)(results[0])); } /// <remarks/> public void SubmitAsync(string account, string password, string mobile, string content) { this.SubmitAsync(account, password, mobile, content, null); } /// <remarks/> public void SubmitAsync(string account, string password, string mobile, string content, object userState) { if ((this.SubmitOperationCompleted == null)) { this.SubmitOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSubmitOperationCompleted); } this.InvokeAsync("Submit", new object[] { account, password, mobile, content}, this.SubmitOperationCompleted, userState); } private void OnSubmitOperationCompleted(object arg) { if ((this.SubmitCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SubmitCompleted(this, new SubmitCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } /// <remarks/> public new void CancelAsync(object userState) { base.CancelAsync(userState); } } /// <remarks/> [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.1")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://106.ihuyi.com/")] public partial class SubmitResult { private int codeField; private string msgField; private int smsidField; /// <remarks/> public int code { get { return this.codeField; } set { this.codeField = value; } } /// <remarks/> public string msg { get { return this.msgField; } set { this.msgField = value; } } /// <remarks/> public int smsid { get { return this.smsidField; } set { this.smsidField = value; } } } /// <remarks/> [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.1")] public delegate void SubmitCompletedEventHandler(object sender, SubmitCompletedEventArgs e); /// <remarks/> [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.1")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SubmitCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { private object[] results; internal SubmitCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : base(exception, cancelled, userState) { this.results = results; } /// <remarks/> public SubmitResult Result { get { this.RaiseExceptionIfNecessary(); return ((SubmitResult)(this.results[0])); } } }
自助申请帐户地址:http://www.ihuyi.com/product.php
完整接口文件地址:http://www.ihuyi.com/upload/file/cu-fa-jie-kou.rar
相关文章推荐
- ASP通过http调用验证码短信接口源码
- JAVA通过http调用验证码短信接口源码
- php通过http调用验证码短信接口源码
- VB通过http调用验证码短信接口源码
- JSP通过http调用验证码短信接口源码
- 调用飞信网关服务器HTTP接口发送短信的ASP源码
- 验证码短信接口php调用http源码
- 验证码短信接口VB6调用http源码
- 通过HttpClient 调用ASP.NET Web API
- 通过HttpClient 调用ASP.NET Web API
- asp.net调用短信接口乱码问题的解决方案(在不修改web.config的前提下)
- 通过HttpClient 调用ASP.NET Web API
- Asp.Net大型项目实践(6)-用Unity实现层与层之间的接口调用(附源码)
- ASP.NET不通过添加web引用的方式调用web service接口
- 通过HttpClient 调用ASP.NET Web API
- ucenter asp.net接口源码,有用户中心、站内短信接口
- ASP.NET后台手动调用POST提交并获取返回值 用于短信平台接口
- Delphi通过调用Http接口实现短信发送的功能
- 通过HttpClient 调用ASP.NET Web API
- 通过HttpClient 调用ASP.NET Web API示例