// Collection of code snippets by Arne Vajhøj
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now)
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.18052
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
//
// This source code was auto-generated by wsdl, Version=4.0.30319.1.
//
namespace Test3.Soap {
using System.Diagnostics;
using System;
using System.Xml.Serialization;
using System.ComponentModel;
using System.Web.Services.Protocols;
using System.Web.Services;
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.1")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="TestManagerSOAPServiceSoapBinding", Namespace="http://soap.test3/")]
public partial class TestManagerSOAPService : System.Web.Services.Protocols.SoapHttpClientProtocol {
private System.Threading.SendOrPostCallback getOneOperationCompleted;
private System.Threading.SendOrPostCallback getAllOperationCompleted;
private System.Threading.SendOrPostCallback saveOperationCompleted;
///
public TestManagerSOAPService() {
this.Url = "http://localhost:8080/test3/TestManagerSOAP";
}
///
public event getOneCompletedEventHandler getOneCompleted;
///
public event getAllCompletedEventHandler getAllCompleted;
///
public event saveCompletedEventHandler saveCompleted;
///
[System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://soap.test3/", ResponseNamespace="http://soap.test3/", Use=System.Web.Services.Description.SoapBindingUse.Literal)]
[return: System.Xml.Serialization.XmlElementAttribute("return")]
public t1 getOne(int arg0) {
object[] results = this.Invoke("getOne", new object[] {
arg0});
return ((t1)(results[0]));
}
///
public System.IAsyncResult BegingetOne(int arg0, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("getOne", new object[] {
arg0}, callback, asyncState);
}
///
public t1 EndgetOne(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((t1)(results[0]));
}
///
public void getOneAsync(int arg0) {
this.getOneAsync(arg0, null);
}
///
public void getOneAsync(int arg0, object userState) {
if ((this.getOneOperationCompleted == null)) {
this.getOneOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetOneOperationCompleted);
}
this.InvokeAsync("getOne", new object[] {
arg0}, this.getOneOperationCompleted, userState);
}
private void OngetOneOperationCompleted(object arg) {
if ((this.getOneCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.getOneCompleted(this, new getOneCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
///
[System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://soap.test3/", ResponseNamespace="http://soap.test3/", Use=System.Web.Services.Description.SoapBindingUse.Literal)]
[return: System.Xml.Serialization.XmlArrayAttribute("return")]
[return: System.Xml.Serialization.XmlArrayItemAttribute("item", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public t1[] getAll() {
object[] results = this.Invoke("getAll", new object[0]);
return ((t1[])(results[0]));
}
///
public System.IAsyncResult BegingetAll(System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("getAll", new object[0], callback, asyncState);
}
///
public t1[] EndgetAll(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((t1[])(results[0]));
}
///
public void getAllAsync() {
this.getAllAsync(null);
}
///
public void getAllAsync(object userState) {
if ((this.getAllOperationCompleted == null)) {
this.getAllOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetAllOperationCompleted);
}
this.InvokeAsync("getAll", new object[0], this.getAllOperationCompleted, userState);
}
private void OngetAllOperationCompleted(object arg) {
if ((this.getAllCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.getAllCompleted(this, new getAllCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
///
[System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://soap.test3/", ResponseNamespace="http://soap.test3/", Use=System.Web.Services.Description.SoapBindingUse.Literal)]
public void save(t1 arg0) {
this.Invoke("save", new object[] {
arg0});
}
///
public System.IAsyncResult Beginsave(t1 arg0, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("save", new object[] {
arg0}, callback, asyncState);
}
///
public void Endsave(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
///
public void saveAsync(t1 arg0) {
this.saveAsync(arg0, null);
}
///
public void saveAsync(t1 arg0, object userState) {
if ((this.saveOperationCompleted == null)) {
this.saveOperationCompleted = new System.Threading.SendOrPostCallback(this.OnsaveOperationCompleted);
}
this.InvokeAsync("save", new object[] {
arg0}, this.saveOperationCompleted, userState);
}
private void OnsaveOperationCompleted(object arg) {
if ((this.saveCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.saveCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(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://soap.test3/")]
public partial class t1 {
private int f1Field;
private string f2Field;
///
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public int f1 {
get {
return this.f1Field;
}
set {
this.f1Field = value;
}
}
///
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string f2 {
get {
return this.f2Field;
}
set {
this.f2Field = value;
}
}
}
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.1")]
public delegate void getOneCompletedEventHandler(object sender, getOneCompletedEventArgs e);
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.1")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class getOneCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal getOneCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
///
public t1 Result {
get {
this.RaiseExceptionIfNecessary();
return ((t1)(this.results[0]));
}
}
}
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.1")]
public delegate void getAllCompletedEventHandler(object sender, getAllCompletedEventArgs e);
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.1")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class getAllCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal getAllCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
///
public t1[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((t1[])(this.results[0]));
}
}
}
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.1")]
public delegate void saveCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
}