//------------------------------------------------------------------------------
//
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,并在以下条件下丢失:
// 代码重新生成。
//
//------------------------------------------------------------------------------
namespace ServiceReference1
{
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
[System.ServiceModel.ServiceContractAttribute(ConfigurationName="ServiceReference1.TestWebServiceSoap")]
public interface TestWebServiceSoap
{
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/HelloWorld", ReplyAction="*")]
System.Threading.Tasks.Task HelloWorldAsync(ServiceReference1.HelloWorldRequest request);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/GetNameByStr", ReplyAction="*")]
System.Threading.Tasks.Task GetNameByStrAsync(ServiceReference1.GetNameByStrRequest request);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/HelloXml", ReplyAction="*")]
System.Threading.Tasks.Task HelloXmlAsync(ServiceReference1.HelloXmlRequest 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 ServiceReference1.HelloWorldRequestBody Body;
public HelloWorldRequest()
{
}
public HelloWorldRequest(ServiceReference1.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 ServiceReference1.HelloWorldResponseBody Body;
public HelloWorldResponse()
{
}
public HelloWorldResponse(ServiceReference1.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 ServiceReference1.GetNameByStrRequestBody Body;
public GetNameByStrRequest()
{
}
public GetNameByStrRequest(ServiceReference1.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 ServiceReference1.GetNameByStrResponseBody Body;
public GetNameByStrResponse()
{
}
public GetNameByStrResponse(ServiceReference1.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.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 HelloXmlRequest
{
[System.ServiceModel.MessageBodyMemberAttribute(Name="HelloXml", Namespace="http://tempuri.org/", Order=0)]
public ServiceReference1.HelloXmlRequestBody Body;
public HelloXmlRequest()
{
}
public HelloXmlRequest(ServiceReference1.HelloXmlRequestBody 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 HelloXmlRequestBody
{
[System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
public string s_barcode;
public HelloXmlRequestBody()
{
}
public HelloXmlRequestBody(string s_barcode)
{
this.s_barcode = s_barcode;
}
}
[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 HelloXmlResponse
{
[System.ServiceModel.MessageBodyMemberAttribute(Name="HelloXmlResponse", Namespace="http://tempuri.org/", Order=0)]
public ServiceReference1.HelloXmlResponseBody Body;
public HelloXmlResponse()
{
}
public HelloXmlResponse(ServiceReference1.HelloXmlResponseBody 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 HelloXmlResponseBody
{
[System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
public System.Xml.XmlElement HelloXmlResult;
public HelloXmlResponseBody()
{
}
public HelloXmlResponseBody(System.Xml.XmlElement HelloXmlResult)
{
this.HelloXmlResult = HelloXmlResult;
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
public interface TestWebServiceSoapChannel : ServiceReference1.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, ServiceReference1.TestWebServiceSoap
{
///
/// 实现此分部方法,配置服务终结点。
///
/// 要配置的终结点
/// 客户端凭据
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 ServiceReference1.TestWebServiceSoap.HelloWorldAsync(ServiceReference1.HelloWorldRequest request)
{
return base.Channel.HelloWorldAsync(request);
}
public System.Threading.Tasks.Task HelloWorldAsync()
{
ServiceReference1.HelloWorldRequest inValue = new ServiceReference1.HelloWorldRequest();
inValue.Body = new ServiceReference1.HelloWorldRequestBody();
return ((ServiceReference1.TestWebServiceSoap)(this)).HelloWorldAsync(inValue);
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
System.Threading.Tasks.Task ServiceReference1.TestWebServiceSoap.GetNameByStrAsync(ServiceReference1.GetNameByStrRequest request)
{
return base.Channel.GetNameByStrAsync(request);
}
public System.Threading.Tasks.Task GetNameByStrAsync(string name)
{
ServiceReference1.GetNameByStrRequest inValue = new ServiceReference1.GetNameByStrRequest();
inValue.Body = new ServiceReference1.GetNameByStrRequestBody();
inValue.Body.name = name;
return ((ServiceReference1.TestWebServiceSoap)(this)).GetNameByStrAsync(inValue);
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
System.Threading.Tasks.Task ServiceReference1.TestWebServiceSoap.HelloXmlAsync(ServiceReference1.HelloXmlRequest request)
{
return base.Channel.HelloXmlAsync(request);
}
public System.Threading.Tasks.Task HelloXmlAsync(string s_barcode)
{
ServiceReference1.HelloXmlRequest inValue = new ServiceReference1.HelloXmlRequest();
inValue.Body = new ServiceReference1.HelloXmlRequestBody();
inValue.Body.s_barcode = s_barcode;
return ((ServiceReference1.TestWebServiceSoap)(this)).HelloXmlAsync(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.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.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,
}
}
}