//------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace JdpLogin { using System.Runtime.Serialization; [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")] [System.Runtime.Serialization.DataContractAttribute(Name="GetTokenRequest", Namespace="http://webservice.jdpowervalues.com/")] public partial class GetTokenRequest : object { private string UsernameField; private string PasswordField; [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false)] public string Username { get { return this.UsernameField; } set { this.UsernameField = value; } } [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=1)] public string Password { get { return this.PasswordField; } set { this.PasswordField = value; } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")] [System.ServiceModel.ServiceContractAttribute(Namespace="http://webservice.jdpowervalues.com/", ConfigurationName="JdpLogin.SecureLoginSoap")] public interface SecureLoginSoap { [System.ServiceModel.OperationContractAttribute(Action="http://webservice.jdpowervalues.com/getToken", ReplyAction="*")] System.Threading.Tasks.Task getTokenAsync(JdpLogin.getTokenRequest1 request); } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] [System.ServiceModel.MessageContractAttribute(IsWrapped=false)] public partial class getTokenRequest1 { [System.ServiceModel.MessageBodyMemberAttribute(Name="getToken", Namespace="http://webservice.jdpowervalues.com/", Order=0)] public JdpLogin.getTokenRequest1Body Body; public getTokenRequest1() { } public getTokenRequest1(JdpLogin.getTokenRequest1Body Body) { this.Body = Body; } } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] [System.Runtime.Serialization.DataContractAttribute(Namespace="http://webservice.jdpowervalues.com/")] public partial class getTokenRequest1Body { [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)] public JdpLogin.GetTokenRequest tokenRequest; public getTokenRequest1Body() { } public getTokenRequest1Body(JdpLogin.GetTokenRequest tokenRequest) { this.tokenRequest = tokenRequest; } } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] [System.ServiceModel.MessageContractAttribute(IsWrapped=false)] public partial class getTokenResponse { [System.ServiceModel.MessageBodyMemberAttribute(Name="getTokenResponse", Namespace="http://webservice.jdpowervalues.com/", Order=0)] public JdpLogin.getTokenResponseBody Body; public getTokenResponse() { } public getTokenResponse(JdpLogin.getTokenResponseBody Body) { this.Body = Body; } } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] [System.Runtime.Serialization.DataContractAttribute(Namespace="http://webservice.jdpowervalues.com/")] public partial class getTokenResponseBody { [System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)] public string getTokenResult; public getTokenResponseBody() { } public getTokenResponseBody(string getTokenResult) { this.getTokenResult = getTokenResult; } } [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")] public interface SecureLoginSoapChannel : JdpLogin.SecureLoginSoap, System.ServiceModel.IClientChannel { } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")] public partial class SecureLoginSoapClient : System.ServiceModel.ClientBase, JdpLogin.SecureLoginSoap { /// /// Implement this partial method to configure the service endpoint. /// /// The endpoint to configure /// The client credentials static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials); public SecureLoginSoapClient(EndpointConfiguration endpointConfiguration) : base(SecureLoginSoapClient.GetBindingForEndpoint(endpointConfiguration), SecureLoginSoapClient.GetEndpointAddress(endpointConfiguration)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } public SecureLoginSoapClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : base(SecureLoginSoapClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } public SecureLoginSoapClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : base(SecureLoginSoapClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } public SecureLoginSoapClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : base(binding, remoteAddress) { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.Threading.Tasks.Task JdpLogin.SecureLoginSoap.getTokenAsync(JdpLogin.getTokenRequest1 request) { return base.Channel.getTokenAsync(request); } public System.Threading.Tasks.Task getTokenAsync(JdpLogin.GetTokenRequest tokenRequest) { JdpLogin.getTokenRequest1 inValue = new JdpLogin.getTokenRequest1(); inValue.Body = new JdpLogin.getTokenRequest1Body(); inValue.Body.tokenRequest = tokenRequest; return ((JdpLogin.SecureLoginSoap)(this)).getTokenAsync(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.SecureLoginSoap)) { 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; result.Security.Mode = System.ServiceModel.BasicHttpSecurityMode.Transport; return result; } if ((endpointConfiguration == EndpointConfiguration.SecureLoginSoap12)) { 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.HttpsTransportBindingElement httpsBindingElement = new System.ServiceModel.Channels.HttpsTransportBindingElement(); httpsBindingElement.AllowCookies = true; httpsBindingElement.MaxBufferSize = int.MaxValue; httpsBindingElement.MaxReceivedMessageSize = int.MaxValue; result.Elements.Add(httpsBindingElement); return result; } throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); } private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.SecureLoginSoap)) { return new System.ServiceModel.EndpointAddress("https://webservice-stage.jdpowervalues.com/vehicles/secure/securelogin.asmx"); } if ((endpointConfiguration == EndpointConfiguration.SecureLoginSoap12)) { return new System.ServiceModel.EndpointAddress("https://webservice-stage.jdpowervalues.com/vehicles/secure/securelogin.asmx"); } throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); } public enum EndpointConfiguration { SecureLoginSoap, SecureLoginSoap12, } } }