📄 secureservice.cs
字号:
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.0.3705.288
//
// 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 wsdl, Version=1.0.3705.288.
//
namespace Services {
using System.Diagnostics;
using System.Xml.Serialization;
using System;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Web.Services;
/// <remarks/>
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="SecureServiceSoap", Namespace="http://yourdomain.com/webservices")]
public class SecureService : System.Web.Services.Protocols.SoapHttpClientProtocol {
public AuthHeader AuthHeaderValue;
/// <remarks/>
public SecureService() {
this.Url = "http://localhost/aspnetunleashedchapter/secureservice.asmx";
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://yourdomain.com/webservices/Login", RequestNamespace="http://yourdomain.com/webservices", ResponseNamespace="http://yourdomain.com/webservices", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ServiceTicket Login(string username, string password) {
object[] results = this.Invoke("Login", new object[] {
username,
password});
return ((ServiceTicket)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginLogin(string username, string password, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("Login", new object[] {
username,
password}, callback, asyncState);
}
/// <remarks/>
public ServiceTicket EndLogin(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ServiceTicket)(results[0]));
}
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("AuthHeaderValue", Required=false)]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://yourdomain.com/webservices/GetLuckyNumber", RequestNamespace="http://yourdomain.com/webservices", ResponseNamespace="http://yourdomain.com/webservices", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int GetLuckyNumber() {
object[] results = this.Invoke("GetLuckyNumber", new object[0]);
return ((int)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetLuckyNumber(System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetLuckyNumber", new object[0], callback, asyncState);
}
/// <remarks/>
public int EndGetLuckyNumber(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((int)(results[0]));
}
}
/// <remarks/>
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://yourdomain.com/webservices")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://yourdomain.com/webservices", IsNullable=false)]
public class AuthHeader : SoapHeader {
/// <remarks/>
public string SessionKey;
}
/// <remarks/>
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://yourdomain.com/webservices")]
public class ServiceTicket {
/// <remarks/>
public bool IsAuthenticated;
/// <remarks/>
public string SessionKey;
/// <remarks/>
public System.DateTime Expiration;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -