互亿无线·让通信更简单

验证码短信接口asp.net调用http源码

2013-07-25 01:31:44

通过验证码短信http调用接口,您可以很快速的在网站或者app中集成手机号验证功能,该源码只是核心代码,具体可以根据您的实际需求进行扩展。 

//------------------------------------------------------------------------------

// 

//     此代码由工具生成。

//     运行时版本:4.0.30319.296

//

//     对此文件的更改可能会导致不正确的行为,并且如果

//     重新生成代码,这些更改将会丢失。

// 

//------------------------------------------------------------------------------

 

using System;

using System.ComponentModel;

using System.Diagnostics;

using System.Web.Services;

using System.Web.Services.Protocols;

using System.Xml.Serialization;

 

// 

// 此源代码由 wsdl 自动生成, Version=4.0.30319.1。

// 

 

 

/// 

[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;

 

    /// 

    public sms()

    {

        this.Url = "http://106.ihuyi.com/webservice/sms.php?smsService";

    }

 

    /// 

    public event SubmitCompletedEventHandler SubmitCompleted;

 

    /// 

    [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]));

    }

 

    /// 

    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);

    }

 

    /// 

    public SubmitResult EndSubmit(System.IAsyncResult asyncResult)

    {

        object[] results = this.EndInvoke(asyncResult);

        return ((SubmitResult)(results[0]));

    }

 

    /// 

    public void SubmitAsync(string account, string password, string mobile, string content)

    {

        this.SubmitAsync(account, password, mobile, content, null);

    }

 

    /// 

    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));

        }

    }

 

    /// 

    public new void CancelAsync(object userState)

    {

        base.CancelAsync(userState);

    }

}

 

/// 

[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;

 

    /// 

    public int code

    {

        get

        {

            return this.codeField;

        }

        set

        {

            this.codeField = value;

        }

    }

 

    /// 

    public string msg

    {

        get

        {

            return this.msgField;

        }

        set

        {

            this.msgField = value;

        }

    }

 

    /// 

    public int smsid

    {

        get

        {

            return this.smsidField;

        }

        set

        {

            this.smsidField = value;

        }

    }

}

 

/// 

[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.1")]

public delegate void SubmitCompletedEventHandler(object sender, SubmitCompletedEventArgs e);

 

/// 

[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;

    }

 

    /// 

    public SubmitResult Result

    {

        get

        {

            this.RaiseExceptionIfNecessary();

            return ((SubmitResult)(this.results[0]));

        }

    }

}

==================================================================

互亿无线验证码短信接口下载地址:https://www.ihuyi.com/duanxin.html 

如有疑问,请联系我们的技术,或者访问我们的网站了解更多信息:https://www.ihuyi.com/

标签:

互亿无线短信新客优惠活动

新用户促销套餐,首购优惠,直接下单购买

  • 验证码通知短信200条体验套餐

    ¥10

    0.05元/条 有效期 12个月

    原价0.055元/条,9.1折

  • 验证码通知短信套餐包1万条

    ¥380

    0.038元/条 有效期 12个月

    原价0.055元/条,6.9折

  • 验证码通知短信套餐包5万条

    ¥1,800

    0.036元/条 有效期 12个月

    原价0.043元/条,8.4折

互亿无线短信支持签名认证

为短信加上您的公司品牌和LOGO

在线咨询
电话咨询
服务热线:
4008 808 898



验证码已发送到您的手机,请查收!

填写验证码后,点击“开通体验账户”自动开通体验账户。

收不到短信验证码?
×