Overview Service Description Client proxy Methods Login Convert GetCurrencyInfo SetCurrencyRate GetCurrencyRate Methods for binding ConverterServiceSoap12 Login Convert GetCurrencyInfo SetCurrencyRate GetCurrencyRate |
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/> /// <remarks> ///Web service that can make currency conversions ///</remarks> [System.Web.Services.WebServiceBinding(Name="ConverterServiceSoap", Namespace="http://tempuri.org/")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class ConverterService : System.Web.Services.Protocols.SoapHttpClientProtocol { private UserInfo UserInfoValueField; private System.Threading.SendOrPostCallback LoginOperationCompleted; private System.Threading.SendOrPostCallback ConvertOperationCompleted; private System.Threading.SendOrPostCallback GetCurrencyInfoOperationCompleted; private System.Threading.SendOrPostCallback SetCurrencyRateOperationCompleted; private System.Threading.SendOrPostCallback GetCurrencyRateOperationCompleted; public ConverterService() { this.Url = "http://mapsbkp.geolives.com/samples/1.1/webservice/ConverterService.asmx"; } public UserInfo UserInfoValue { get { return this.UserInfoValueField; } set { this.UserInfoValueField = value; } } public event LoginCompletedEventHandler LoginCompleted; public event ConvertCompletedEventHandler ConvertCompleted; public event GetCurrencyInfoCompletedEventHandler GetCurrencyInfoCompleted; public event SetCurrencyRateCompletedEventHandler SetCurrencyRateCompleted; public event GetCurrencyRateCompletedEventHandler GetCurrencyRateCompleted; /// <remarks> ///Registers the user into the system ///</remarks> [System.Web.Services.Protocols.SoapHeaderAttribute("UserInfoValue", Direction=System.Web.Services.Protocols.SoapHeaderDirection.Out)] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/Login", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, Use=System.Web.Services.Description.SoapBindingUse.Literal)] public void Login(string a) { this.Invoke("Login", new object[] { a}); } public System.IAsyncResult BeginLogin(string a, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("Login", new object[] { a}, callback, asyncState); } public void EndLogin(System.IAsyncResult asyncResult) { this.EndInvoke(asyncResult); } public void LoginAsync(string a) { this.LoginAsync(a, null); } public void LoginAsync(string a, object userState) { if ((this.LoginOperationCompleted == null)) { this.LoginOperationCompleted = new System.Threading.SendOrPostCallback( this.OnLoginCompleted); } this.InvokeAsync("Login", new object[] { a}, this.LoginOperationCompleted, userState); } private void OnLoginCompleted(object arg) { if ((this.LoginCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = (( System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.LoginCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs( invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } /// <remarks> ///Converts an amount from one currency to another currency ///</remarks> [System.Web.Services.Protocols.SoapHeaderAttribute("UserInfoValueField")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/Convert", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, Use=System.Web.Services.Description.SoapBindingUse.Literal)] public double Convert(string sourceCurrency, string targetCurrency, double value) { object[] results = this.Invoke("Convert", new object[] { sourceCurrency, targetCurrency, value}); return ((double)(results[0])); } public System.IAsyncResult BeginConvert(string sourceCurrency, string targetCurrency, double value, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("Convert", new object[] { sourceCurrency, targetCurrency, value}, callback, asyncState); } public double EndConvert(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((double)(results[0])); } public void ConvertAsync(string sourceCurrency, string targetCurrency, double value) { this.ConvertAsync(sourceCurrency, targetCurrency, value, null); } public void ConvertAsync(string sourceCurrency, string targetCurrency, double value, object userState) { if ((this.ConvertOperationCompleted == null)) { this.ConvertOperationCompleted = new System.Threading.SendOrPostCallback( this.OnConvertCompleted); } this.InvokeAsync("Convert", new object[] { sourceCurrency, targetCurrency, value}, this.ConvertOperationCompleted, userState); } private void OnConvertCompleted(object arg) { if ((this.ConvertCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = (( System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.ConvertCompleted(this, new ConvertCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } /// <remarks> ///Returns a list of currency rates ///</remarks> [System.Web.Services.Protocols.SoapHeaderAttribute("UserInfoValueField")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute( "http://tempuri.org/GetCurrencyInfo", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, Use=System.Web.Services.Description.SoapBindingUse.Literal)] public CurrencyInfo[] GetCurrencyInfo() { object[] results = this.Invoke("GetCurrencyInfo", new object[0]); return ((CurrencyInfo[])(results[0])); } public System.IAsyncResult BeginGetCurrencyInfo(System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetCurrencyInfo", new object[0], callback, asyncState); } public CurrencyInfo[] EndGetCurrencyInfo(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((CurrencyInfo[])(results[0])); } public void GetCurrencyInfoAsync() { this.GetCurrencyInfoAsync(null); } public void GetCurrencyInfoAsync(object userState) { if ((this.GetCurrencyInfoOperationCompleted == null)) { this.GetCurrencyInfoOperationCompleted = new System.Threading.SendOrPostCallback( this.OnGetCurrencyInfoCompleted); } this.InvokeAsync("GetCurrencyInfo", new object[0], this.GetCurrencyInfoOperationCompleted, userState); } private void OnGetCurrencyInfoCompleted(object arg) { if ((this.GetCurrencyInfoCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = (( System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetCurrencyInfoCompleted(this, new GetCurrencyInfoCompletedEventArgs( invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } /// <remarks> ///Sets the rate of a currency ///</remarks> [System.Web.Services.Protocols.SoapHeaderAttribute("UserInfoValueField")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute( "http://tempuri.org/SetCurrencyRate", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, Use=System.Web.Services.Description.SoapBindingUse.Literal)] public void SetCurrencyRate(string currency, double rate) { this.Invoke("SetCurrencyRate", new object[] { currency, rate}); } public System.IAsyncResult BeginSetCurrencyRate(string currency, double rate, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetCurrencyRate", new object[] { currency, rate}, callback, asyncState); } public void EndSetCurrencyRate(System.IAsyncResult asyncResult) { this.EndInvoke(asyncResult); } public void SetCurrencyRateAsync(string currency, double rate) { this.SetCurrencyRateAsync(currency, rate, null); } public void SetCurrencyRateAsync(string currency, double rate, object userState) { if ((this.SetCurrencyRateOperationCompleted == null)) { this.SetCurrencyRateOperationCompleted = new System.Threading.SendOrPostCallback( this.OnSetCurrencyRateCompleted); } this.InvokeAsync("SetCurrencyRate", new object[] { currency, rate}, this.SetCurrencyRateOperationCompleted, userState); } private void OnSetCurrencyRateCompleted(object arg) { if ((this.SetCurrencyRateCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = (( System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetCurrencyRateCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } /// <remarks> ///Returns the rate of a currency ///</remarks> [System.Web.Services.Protocols.SoapHeaderAttribute("UserInfoValueField")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute( "http://tempuri.org/GetCurrencyRate", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, Use=System.Web.Services.Description.SoapBindingUse.Literal)] public double GetCurrencyRate(string cname) { object[] results = this.Invoke("GetCurrencyRate", new object[] { cname}); return ((double)(results[0])); } public System.IAsyncResult BeginGetCurrencyRate(string cname, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetCurrencyRate", new object[] { cname}, callback, asyncState); } public double EndGetCurrencyRate(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((double)(results[0])); } public void GetCurrencyRateAsync(string cname) { this.GetCurrencyRateAsync(cname, null); } public void GetCurrencyRateAsync(string cname, object userState) { if ((this.GetCurrencyRateOperationCompleted == null)) { this.GetCurrencyRateOperationCompleted = new System.Threading.SendOrPostCallback( this.OnGetCurrencyRateCompleted); } this.InvokeAsync("GetCurrencyRate", new object[] { cname}, this.GetCurrencyRateOperationCompleted, userState); } private void OnGetCurrencyRateCompleted(object arg) { if ((this.GetCurrencyRateCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = (( System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetCurrencyRateCompleted(this, new GetCurrencyRateCompletedEventArgs( invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } } /// <remarks/> [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.1433")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")] [System.Xml.Serialization.XmlRootAttribute(Namespace="http://tempuri.org/", IsNullable=true)] public partial class UserInfo : System.Web.Services.Protocols.SoapHeader { /// <remarks/> public int userId; } /// <remarks/> [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.1433")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")] public partial class CurrencyInfo { /// <remarks/> public string Name; /// <remarks/> public double Rate; } public delegate void LoginCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs args); public partial class ConvertCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { private object[] results; internal ConvertCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : base(exception, cancelled, userState) { this.results = results; } public double Result { get { this.RaiseExceptionIfNecessary(); return ((double)(this.results[0])); } } } public delegate void ConvertCompletedEventHandler(object sender, ConvertCompletedEventArgs args); public partial class GetCurrencyInfoCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { private object[] results; internal GetCurrencyInfoCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : base(exception, cancelled, userState) { this.results = results; } public CurrencyInfo[] Result { get { this.RaiseExceptionIfNecessary(); return ((CurrencyInfo[])(this.results[0])); } } } public delegate void GetCurrencyInfoCompletedEventHandler(object sender, GetCurrencyInfoCompletedEventArgs args); public delegate void SetCurrencyRateCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs args); public partial class GetCurrencyRateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { private object[] results; internal GetCurrencyRateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : base(exception, cancelled, userState) { this.results = results; } public double Result { get { this.RaiseExceptionIfNecessary(); return ((double)(this.results[0])); } } } public delegate void GetCurrencyRateCompletedEventHandler(object sender, GetCurrencyRateCompletedEventArgs args); |