//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
//
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:2.0.50727.4952
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
//
// This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.4952.
//
#pragma warning disable 1591
namespace ClassLibrary1.net.webservicex.www {
using System.Diagnostics;
using System.Web.Services;
using System.ComponentModel;
using System.Web.Services.Protocols;
using System;
using System.Xml.Serialization;
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="SendSMSWorldSoap", Namespace="http://www.webserviceX.NET")]
public partial class SendSMSWorld : System.Web.Services.Protocols.SoapHttpClientProtocol {
private System.Threading.SendOrPostCallback sendSMSOperationCompleted;
private bool useDefaultCredentialsSetExplicitly;
///
public SendSMSWorld() {
this.Url = global::ClassLibrary1.Properties.Settings.Default.ClassLibrary1_net_webservicex_www_SendSMSWorld;
if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
this.UseDefaultCredentials = true;
this.useDefaultCredentialsSetExplicitly = false;
}
else {
this.useDefaultCredentialsSetExplicitly = true;
}
}
public new string Url {
get {
return base.Url;
}
set {
if ((((this.IsLocalFileSystemWebService(base.Url) == true)
&& (this.useDefaultCredentialsSetExplicitly == false))
&& (this.IsLocalFileSystemWebService(value) == false))) {
base.UseDefaultCredentials = false;
}
base.Url = value;
}
}
public new bool UseDefaultCredentials {
get {
return base.UseDefaultCredentials;
}
set {
base.UseDefaultCredentials = value;
this.useDefaultCredentialsSetExplicitly = true;
}
}
///
public event sendSMSCompletedEventHandler sendSMSCompleted;
///
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.webserviceX.NET/sendSMS", RequestNamespace="http://www.webserviceX.NET", ResponseNamespace="http://www.webserviceX.NET", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string sendSMS(string FromEmailAddress, string CountryCode, string MobileNumber, string Message) {
object[] results = this.Invoke("sendSMS", new object[] {
FromEmailAddress,
CountryCode,
MobileNumber,
Message});
return ((string)(results[0]));
}
///
public void sendSMSAsync(string FromEmailAddress, string CountryCode, string MobileNumber, string Message) {
this.sendSMSAsync(FromEmailAddress, CountryCode, MobileNumber, Message, null);
}
///
public void sendSMSAsync(string FromEmailAddress, string CountryCode, string MobileNumber, string Message, object userState) {
if ((this.sendSMSOperationCompleted == null)) {
this.sendSMSOperationCompleted = new System.Threading.SendOrPostCallback(this.OnsendSMSOperationCompleted);
}
this.InvokeAsync("sendSMS", new object[] {
FromEmailAddress,
CountryCode,
MobileNumber,
Message}, this.sendSMSOperationCompleted, userState);
}
private void OnsendSMSOperationCompleted(object arg) {
if ((this.sendSMSCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.sendSMSCompleted(this, new sendSMSCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
///
public new void CancelAsync(object userState) {
base.CancelAsync(userState);
}
private bool IsLocalFileSystemWebService(string url) {
if (((url == null)
|| (url == string.Empty))) {
return false;
}
System.Uri wsUri = new System.Uri(url);
if (((wsUri.Port >= 1024)
&& (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
return true;
}
return false;
}
}
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
public delegate void sendSMSCompletedEventHandler(object sender, sendSMSCompletedEventArgs e);
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.4927")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class sendSMSCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal sendSMSCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
///
public string Result {
get {
this.RaiseExceptionIfNecessary();
return ((string)(this.results[0]));
}
}
}
}
#pragma warning restore 1591