Web Service
TestService
Overview
Service Description
Client proxy

Methods Echo
Add

Methods for binding
TestServiceSoap12
Echo
Add

Select the language for which you want to generate a proxy     

C# Client Proxy    Download

// ------------------------------------------------------------------------------
//  <autogenerated>
//      This code was generated by a tool.
//      Mono Runtime Version: 2.0.50727.1433
// 
//      Changes to this file may cause incorrect behavior and will be lost if 
//      the code is regenerated.
//  </autogenerated>
// ------------------------------------------------------------------------------



/// <remarks/>
[System.Web.Services.WebServiceBinding(Name="TestServiceSoap", Namespace="http://tempuri.org/")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class TestService : System.Web.Services.Protocols.SoapHttpClientProtocol {
    
    private System.Threading.SendOrPostCallback EchoOperationCompleted;
    
    private System.Threading.SendOrPostCallback AddOperationCompleted;
    
    public TestService() {
        this.Url = "http://mapsbkp.geolives.com/samples/1.1/webservice/TestService.asmx";
    }
    
    public event EchoCompletedEventHandler EchoCompleted;
    
    public event AddCompletedEventHandler AddCompleted;
    
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/Echo",
          RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/",
          ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped,
          Use=System.Web.Services.Description.SoapBindingUse.Literal)]
    public string Echo(string a) {
        object[] results = this.Invoke("Echo"new object[] {
                    a});
        return ((string)(results[0]));
    }
    
    public System.IAsyncResult BeginEcho(string a, System.AsyncCallback callback, object
          asyncState) {
        return this.BeginInvoke("Echo"new object[] {
                    a}, callback, asyncState);
    }
    
    public string EndEcho(System.IAsyncResult asyncResult) {
        object[] results = this.EndInvoke(asyncResult);
        return ((string)(results[0]));
    }
    
    public void EchoAsync(string a) {
        this.EchoAsync(a, null);
    }
    
    public void EchoAsync(string a, object userState) {
        if ((this.EchoOperationCompleted == null)) {
            this.EchoOperationCompleted = new System.Threading.SendOrPostCallback(
                 this.OnEchoCompleted);
        }
        this.InvokeAsync("Echo"new object[] {
                    a}, this.EchoOperationCompleted, userState);
    }
    
    private void OnEchoCompleted(object arg) {
        if ((this.EchoCompleted != null)) {
            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((
                 System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
            this.EchoCompleted(thisnew EchoCompletedEventArgs(invokeArgs.Results,
                  invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
        }
    }
    
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/Add",
          RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/",
          ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped,
          Use=System.Web.Services.Description.SoapBindingUse.Literal)]
    public int Add(int a, int b) {
        object[] results = this.Invoke("Add"new object[] {
                    a,
                    b});
        return ((int)(results[0]));
    }
    
    public System.IAsyncResult BeginAdd(int a, int b, System.AsyncCallback callback, object
          asyncState) {
        return this.BeginInvoke("Add"new object[] {
                    a,
                    b}, callback, asyncState);
    }
    
    public int EndAdd(System.IAsyncResult asyncResult) {
        object[] results = this.EndInvoke(asyncResult);
        return ((int)(results[0]));
    }
    
    public void AddAsync(int a, int b) {
        this.AddAsync(a, b, null);
    }
    
    public void AddAsync(int a, int b, object userState) {
        if ((this.AddOperationCompleted == null)) {
            this.AddOperationCompleted = new System.Threading.SendOrPostCallback(
                 this.OnAddCompleted);
        }
        this.InvokeAsync("Add"new object[] {
                    a,
                    b}, this.AddOperationCompleted, userState);
    }
    
    private void OnAddCompleted(object arg) {
        if ((this.AddCompleted != null)) {
            System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((
                 System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
            this.AddCompleted(thisnew AddCompletedEventArgs(invokeArgs.Results,
                  invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
        }
    }
}

public partial class EchoCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    
    private object[] results;
    
    internal EchoCompletedEventArgs(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]));
        }
    }
}

public delegate void EchoCompletedEventHandler(object sender, EchoCompletedEventArgs args);

public partial class AddCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    
    private object[] results;
    
    internal AddCompletedEventArgs(object[] results, System.Exception exception, bool cancelled,
          object userState) : 
            base(exception, cancelled, userState) {
        this.results = results;
    }
    
    public int Result {
        get {
            this.RaiseExceptionIfNecessary();
            return ((int)(this.results[0]));
        }
    }
}

public delegate void AddCompletedEventHandler(object sender, AddCompletedEventArgs args);