//------------------------------------------------------------------------------
|
// <auto-generated>
|
// 此代码由工具生成。
|
//
|
// 对此文件的更改可能导致不正确的行为,并在以下条件下丢失:
|
// 代码重新生成。
|
// </auto-generated>
|
//------------------------------------------------------------------------------
|
|
namespace RoverWebService
|
{
|
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
|
[System.ServiceModel.ServiceContractAttribute(ConfigurationName="RoverWebService.TestWebServiceSoap")]
|
public interface TestWebServiceSoap
|
{
|
|
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/HelloWorld", ReplyAction="*")]
|
System.Threading.Tasks.Task<RoverWebService.HelloWorldResponse> HelloWorldAsync(RoverWebService.HelloWorldRequest request);
|
|
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/GetNameByStr", ReplyAction="*")]
|
System.Threading.Tasks.Task<RoverWebService.GetNameByStrResponse> GetNameByStrAsync(RoverWebService.GetNameByStrRequest request);
|
}
|
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
[System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
|
public partial class HelloWorldRequest
|
{
|
|
[System.ServiceModel.MessageBodyMemberAttribute(Name="HelloWorld", Namespace="http://tempuri.org/", Order=0)]
|
public RoverWebService.HelloWorldRequestBody Body;
|
|
public HelloWorldRequest()
|
{
|
}
|
|
public HelloWorldRequest(RoverWebService.HelloWorldRequestBody Body)
|
{
|
this.Body = Body;
|
}
|
}
|
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
[System.Runtime.Serialization.DataContractAttribute()]
|
public partial class HelloWorldRequestBody
|
{
|
|
public HelloWorldRequestBody()
|
{
|
}
|
}
|
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
[System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
|
public partial class HelloWorldResponse
|
{
|
|
[System.ServiceModel.MessageBodyMemberAttribute(Name="HelloWorldResponse", Namespace="http://tempuri.org/", Order=0)]
|
public RoverWebService.HelloWorldResponseBody Body;
|
|
public HelloWorldResponse()
|
{
|
}
|
|
public HelloWorldResponse(RoverWebService.HelloWorldResponseBody Body)
|
{
|
this.Body = Body;
|
}
|
}
|
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
[System.Runtime.Serialization.DataContractAttribute(Namespace="http://tempuri.org/")]
|
public partial class HelloWorldResponseBody
|
{
|
|
[System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
|
public string HelloWorldResult;
|
|
public HelloWorldResponseBody()
|
{
|
}
|
|
public HelloWorldResponseBody(string HelloWorldResult)
|
{
|
this.HelloWorldResult = HelloWorldResult;
|
}
|
}
|
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
[System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
|
public partial class GetNameByStrRequest
|
{
|
|
[System.ServiceModel.MessageBodyMemberAttribute(Name="GetNameByStr", Namespace="http://tempuri.org/", Order=0)]
|
public RoverWebService.GetNameByStrRequestBody Body;
|
|
public GetNameByStrRequest()
|
{
|
}
|
|
public GetNameByStrRequest(RoverWebService.GetNameByStrRequestBody Body)
|
{
|
this.Body = Body;
|
}
|
}
|
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
[System.Runtime.Serialization.DataContractAttribute(Namespace="http://tempuri.org/")]
|
public partial class GetNameByStrRequestBody
|
{
|
|
[System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
|
public string name;
|
|
public GetNameByStrRequestBody()
|
{
|
}
|
|
public GetNameByStrRequestBody(string name)
|
{
|
this.name = name;
|
}
|
}
|
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
[System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
|
public partial class GetNameByStrResponse
|
{
|
|
[System.ServiceModel.MessageBodyMemberAttribute(Name="GetNameByStrResponse", Namespace="http://tempuri.org/", Order=0)]
|
public RoverWebService.GetNameByStrResponseBody Body;
|
|
public GetNameByStrResponse()
|
{
|
}
|
|
public GetNameByStrResponse(RoverWebService.GetNameByStrResponseBody Body)
|
{
|
this.Body = Body;
|
}
|
}
|
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
[System.Runtime.Serialization.DataContractAttribute(Namespace="http://tempuri.org/")]
|
public partial class GetNameByStrResponseBody
|
{
|
|
[System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
|
public string GetNameByStrResult;
|
|
public GetNameByStrResponseBody()
|
{
|
}
|
|
public GetNameByStrResponseBody(string GetNameByStrResult)
|
{
|
this.GetNameByStrResult = GetNameByStrResult;
|
}
|
}
|
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
|
public interface TestWebServiceSoapChannel : RoverWebService.TestWebServiceSoap, System.ServiceModel.IClientChannel
|
{
|
}
|
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
|
public partial class TestWebServiceSoapClient : System.ServiceModel.ClientBase<RoverWebService.TestWebServiceSoap>, RoverWebService.TestWebServiceSoap
|
{
|
|
/// <summary>
|
/// 实现此分部方法,配置服务终结点。
|
/// </summary>
|
/// <param name="serviceEndpoint">要配置的终结点</param>
|
/// <param name="clientCredentials">客户端凭据</param>
|
static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);
|
|
public TestWebServiceSoapClient(EndpointConfiguration endpointConfiguration) :
|
base(TestWebServiceSoapClient.GetBindingForEndpoint(endpointConfiguration), TestWebServiceSoapClient.GetEndpointAddress(endpointConfiguration))
|
{
|
this.Endpoint.Name = endpointConfiguration.ToString();
|
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
|
}
|
|
public TestWebServiceSoapClient(EndpointConfiguration endpointConfiguration, string remoteAddress) :
|
base(TestWebServiceSoapClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
|
{
|
this.Endpoint.Name = endpointConfiguration.ToString();
|
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
|
}
|
|
public TestWebServiceSoapClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
|
base(TestWebServiceSoapClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
|
{
|
this.Endpoint.Name = endpointConfiguration.ToString();
|
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
|
}
|
|
public TestWebServiceSoapClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
|
base(binding, remoteAddress)
|
{
|
}
|
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
System.Threading.Tasks.Task<RoverWebService.HelloWorldResponse> RoverWebService.TestWebServiceSoap.HelloWorldAsync(RoverWebService.HelloWorldRequest request)
|
{
|
return base.Channel.HelloWorldAsync(request);
|
}
|
|
public System.Threading.Tasks.Task<RoverWebService.HelloWorldResponse> HelloWorldAsync()
|
{
|
RoverWebService.HelloWorldRequest inValue = new RoverWebService.HelloWorldRequest();
|
inValue.Body = new RoverWebService.HelloWorldRequestBody();
|
return ((RoverWebService.TestWebServiceSoap)(this)).HelloWorldAsync(inValue);
|
}
|
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
System.Threading.Tasks.Task<RoverWebService.GetNameByStrResponse> RoverWebService.TestWebServiceSoap.GetNameByStrAsync(RoverWebService.GetNameByStrRequest request)
|
{
|
return base.Channel.GetNameByStrAsync(request);
|
}
|
|
public System.Threading.Tasks.Task<RoverWebService.GetNameByStrResponse> GetNameByStrAsync(string name)
|
{
|
RoverWebService.GetNameByStrRequest inValue = new RoverWebService.GetNameByStrRequest();
|
inValue.Body = new RoverWebService.GetNameByStrRequestBody();
|
inValue.Body.name = name;
|
return ((RoverWebService.TestWebServiceSoap)(this)).GetNameByStrAsync(inValue);
|
}
|
|
public virtual System.Threading.Tasks.Task OpenAsync()
|
{
|
return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
|
}
|
|
public virtual System.Threading.Tasks.Task CloseAsync()
|
{
|
return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndClose));
|
}
|
|
private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
|
{
|
if ((endpointConfiguration == EndpointConfiguration.TestWebServiceSoap))
|
{
|
System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
|
result.MaxBufferSize = int.MaxValue;
|
result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
|
result.MaxReceivedMessageSize = int.MaxValue;
|
result.AllowCookies = true;
|
return result;
|
}
|
if ((endpointConfiguration == EndpointConfiguration.TestWebServiceSoap12))
|
{
|
System.ServiceModel.Channels.CustomBinding result = new System.ServiceModel.Channels.CustomBinding();
|
System.ServiceModel.Channels.TextMessageEncodingBindingElement textBindingElement = new System.ServiceModel.Channels.TextMessageEncodingBindingElement();
|
textBindingElement.MessageVersion = System.ServiceModel.Channels.MessageVersion.CreateVersion(System.ServiceModel.EnvelopeVersion.Soap12, System.ServiceModel.Channels.AddressingVersion.None);
|
result.Elements.Add(textBindingElement);
|
System.ServiceModel.Channels.HttpTransportBindingElement httpBindingElement = new System.ServiceModel.Channels.HttpTransportBindingElement();
|
httpBindingElement.AllowCookies = true;
|
httpBindingElement.MaxBufferSize = int.MaxValue;
|
httpBindingElement.MaxReceivedMessageSize = int.MaxValue;
|
result.Elements.Add(httpBindingElement);
|
return result;
|
}
|
throw new System.InvalidOperationException(string.Format("找不到名称为“{0}”的终结点。", endpointConfiguration));
|
}
|
|
private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration)
|
{
|
if ((endpointConfiguration == EndpointConfiguration.TestWebServiceSoap))
|
{
|
return new System.ServiceModel.EndpointAddress("http://192.168.1.25:8084/TestWebService.asmx");
|
}
|
if ((endpointConfiguration == EndpointConfiguration.TestWebServiceSoap12))
|
{
|
return new System.ServiceModel.EndpointAddress("http://192.168.1.25:8084/TestWebService.asmx");
|
}
|
throw new System.InvalidOperationException(string.Format("找不到名称为“{0}”的终结点。", endpointConfiguration));
|
}
|
|
public enum EndpointConfiguration
|
{
|
|
TestWebServiceSoap,
|
|
TestWebServiceSoap12,
|
}
|
}
|
}
|