Bugzilla – Attachment 170677 Details for
Bug 322400
[System.Web.Services] SOAP-Problems
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
c#-proxy for my sample ws
MyTestService.cs (text/plain), 6.40 KB, created by
Thomas Wiest
on 2006-10-20 21:56:00 UTC
(
hide
)
Description:
c#-proxy for my sample ws
Filename:
MIME Type:
Creator:
Thomas Wiest
Created:
2006-10-20 21:56:00 UTC
Size:
6.40 KB
patch
obsolete
>// ------------------------------------------------------------------------------ >// <autogenerated> >// This code was generated by a tool. >// Mono Runtime Version: 2.0.50727.42 >// >// Changes to this file may cause incorrect behavior and will be lost if >// the code is regenerated. >// </autogenerated> >// ------------------------------------------------------------------------------ > >// >// This source code was auto-generated by Web Services Description Language Utility >//Mono Framework v2.0.50727.42 >// > > >/// <remarks/> >[System.Web.Services.WebServiceBinding(Name="MyTestServiceSoap", Namespace="http://tempuri.org/")] >[System.Diagnostics.DebuggerStepThroughAttribute()] >[System.ComponentModel.DesignerCategoryAttribute("code")] >public class MyTestService : System.Web.Services.Protocols.SoapHttpClientProtocol { > > private System.Threading.SendOrPostCallback SayHelloOperationCompleted; > > public MyTestService() { > this.Url = "http://localhost:8080/MyTestService.asmx"; > } > > private event SayHelloCompletedEventHandler SayHelloCompleted; > > [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SayHello", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, Use=System.Web.Services.Description.SoapBindingUse.Literal)] > public string SayHello(string name) { > object[] results = this.Invoke("SayHello", new object[] { > name}); > return ((string)(results[0])); > } > > public System.IAsyncResult BeginSayHello(string name, System.AsyncCallback callback, object asyncState) { > return this.BeginInvoke("SayHello", new object[] { > name}, callback, asyncState); > } > > public string EndSayHello(System.IAsyncResult asyncResult) { > object[] results = this.EndInvoke(asyncResult); > return ((string)(results[0])); > } > > public void SayHelloAsync(string name) { > this.SayHelloAsync(name, null); > } > > public void SayHelloAsync(string name, object userState) { > if ((this.SayHelloOperationCompleted == null)) { > this.SayHelloOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSayHelloCompleted); > } > this.InvokeAsync("SayHello", new object[] { > name}, this.SayHelloOperationCompleted, userState); > } > > private void OnSayHelloCompleted(object arg) { > if ((this.SayHelloCompleted != null)) { > System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); > this.SayHelloCompleted(this, new SayHelloCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); > } > } > public static void Main() { > MyTestService service=new MyTestService(); > System.Console.WriteLine(service.SayHello("Christoph")); > } >} > >public class SayHelloCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { > > private object[] results; > > internal SayHelloCompletedEventArgs(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 SayHelloCompletedEventHandler(object sender, SayHelloCompletedEventArgs args); > >/*/// <remarks/> >[System.Web.Services.WebServiceBinding(Name="MyTestServiceSoap", Namespace="http://tempuri.org/")] >[System.Diagnostics.DebuggerStepThroughAttribute()] >[System.ComponentModel.DesignerCategoryAttribute("code")] >public class MyTestService1 : System.Web.Services.Protocols.SoapHttpClientProtocol { > > private System.Threading.SendOrPostCallback SayHelloOperationCompleted; > > public MyTestService1() { > this.Url = "http://localhost:8080/MyTestService.asmx"; > } > > private event SayHelloCompletedEventHandler SayHelloCompleted; > > [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SayHello", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, Use=System.Web.Services.Description.SoapBindingUse.Literal)] > public string SayHello(string name) { > object[] results = this.Invoke("SayHello", new object[] { > name}); > return ((string)(results[0])); > } > > public System.IAsyncResult BeginSayHello(string name, System.AsyncCallback callback, object asyncState) { > return this.BeginInvoke("SayHello", new object[] { > name}, callback, asyncState); > } > > public string EndSayHello(System.IAsyncResult asyncResult) { > object[] results = this.EndInvoke(asyncResult); > return ((string)(results[0])); > } > > public void SayHelloAsync(string name) { > this.SayHelloAsync(name, null); > } > > public void SayHelloAsync(string name, object userState) { > if ((this.SayHelloOperationCompleted == null)) { > this.SayHelloOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSayHelloCompleted); > } > this.InvokeAsync("SayHello", new object[] { > name}, this.SayHelloOperationCompleted, userState); > } > > private void OnSayHelloCompleted(object arg) { > if ((this.SayHelloCompleted != null)) { > System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); > this.SayHelloCompleted(this, new SayHelloCompletedEventArgs1(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); > } > } >} > >public class SayHelloCompletedEventArgs1 : System.ComponentModel.AsyncCompletedEventArgs { > > private object[] results; > > internal SayHelloCompletedEventArgs1(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 SayHelloCompletedEventHandler(object sender, SayHelloCompletedEventArgs1 args);*/
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 322400
:
170676
| 170677 |
170678
|
170679
|
220559