Advertisement
Guest User

NOT WORKING

a guest
Sep 20th, 2018
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 8.76 KB | None | 0 0
  1. //------------------------------------------------------------------------------
  2. // <generado automáticamente>
  3. //     Este código fue generado por una herramienta.
  4. //     //
  5. //     Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
  6. //     se vuelve a generar el código.
  7. // </generado automáticamente>
  8. //------------------------------------------------------------------------------
  9.  
  10. namespace Test
  11. {
  12.    
  13.    
  14.     [System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.0.1")]
  15.     [System.ServiceModel.ServiceContractAttribute(Namespace= "http://DefaultNamespace", ConfigurationName="Maullin.CrSeed")]
  16.     public interface CrSeed
  17.     {
  18.        
  19.         [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")]
  20.         [System.ServiceModel.XmlSerializerFormatAttribute(Style=System.ServiceModel.OperationFormatStyle.Rpc, SupportFaults=true, Use=System.ServiceModel.OperationFormatUse.Encoded)]
  21.         [return: System.ServiceModel.MessageParameterAttribute(Name="getStateReturn")]
  22.         System.Threading.Tasks.Task<string> getStateAsync();
  23.        
  24.         [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")]
  25.         [System.ServiceModel.XmlSerializerFormatAttribute(Style=System.ServiceModel.OperationFormatStyle.Rpc, SupportFaults=true, Use=System.ServiceModel.OperationFormatUse.Encoded)]
  26.         [return: System.ServiceModel.MessageParameterAttribute(Name="getSeedReturn")]
  27.         System.Threading.Tasks.Task<string> getSeedAsync();
  28.  
  29.         [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")]
  30.         [System.ServiceModel.XmlSerializerFormatAttribute(Style=System.ServiceModel.OperationFormatStyle.Rpc, SupportFaults=true, Use=System.ServiceModel.OperationFormatUse.Encoded)]
  31.         [return: System.ServiceModel.MessageParameterAttribute(Name="getVersionMayorReturn")]
  32.         System.Threading.Tasks.Task<string> getVersionMayorAsync();
  33.        
  34.         [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")]
  35.         [System.ServiceModel.XmlSerializerFormatAttribute(Style=System.ServiceModel.OperationFormatStyle.Rpc, SupportFaults=true, Use=System.ServiceModel.OperationFormatUse.Encoded)]
  36.         [return: System.ServiceModel.MessageParameterAttribute(Name="getVersionMenorReturn")]
  37.         System.Threading.Tasks.Task<string> getVersionMenorAsync();
  38.        
  39.         [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")]
  40.         [System.ServiceModel.XmlSerializerFormatAttribute(Style=System.ServiceModel.OperationFormatStyle.Rpc, SupportFaults=true, Use=System.ServiceModel.OperationFormatUse.Encoded)]
  41.         [return: System.ServiceModel.MessageParameterAttribute(Name="getVersionPatchReturn")]
  42.         System.Threading.Tasks.Task<string> getVersionPatchAsync();
  43.     }
  44.    
  45.     [System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.0.1")]
  46.     public interface CrSeedChannel : Maullin.CrSeed, System.ServiceModel.IClientChannel
  47.     {
  48.     }
  49.    
  50.     [System.Diagnostics.DebuggerStepThroughAttribute()]
  51.     [System.CodeDom.Compiler.GeneratedCodeAttribute("dotnet-svcutil", "1.0.0.1")]
  52.     public partial class CrSeedClient : System.ServiceModel.ClientBase<Maullin.CrSeed>, Maullin.CrSeed
  53.     {
  54.        
  55.     /// <summary>
  56.     /// Implemente este método parcial para configurar el punto de conexión de servicio.
  57.     /// </summary>
  58.     /// <param name="serviceEndpoint">El punto de conexión para configurar</param>
  59.     /// <param name="clientCredentials">Credenciales de cliente</param>
  60.     static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);
  61.        
  62.         public CrSeedClient() :
  63.                 base(CrSeedClient.GetDefaultBinding(), CrSeedClient.GetDefaultEndpointAddress())
  64.         {
  65.             this.Endpoint.Name = EndpointConfiguration.CrSeed.ToString();
  66.             ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
  67.            
  68.         }
  69.        
  70.         public CrSeedClient(EndpointConfiguration endpointConfiguration) :
  71.                 base(CrSeedClient.GetBindingForEndpoint(endpointConfiguration), CrSeedClient.GetEndpointAddress(endpointConfiguration))
  72.         {
  73.             this.Endpoint.Name = endpointConfiguration.ToString();
  74.             ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
  75.         }
  76.        
  77.         public CrSeedClient(EndpointConfiguration endpointConfiguration, string remoteAddress) :
  78.                 base(CrSeedClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
  79.         {
  80.             this.Endpoint.Name = endpointConfiguration.ToString();
  81.             ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
  82.         }
  83.        
  84.         public CrSeedClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
  85.                 base(CrSeedClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
  86.         {
  87.             this.Endpoint.Name = endpointConfiguration.ToString();
  88.             ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
  89.         }
  90.        
  91.         public CrSeedClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
  92.                 base(binding, remoteAddress)
  93.         {
  94.         }
  95.        
  96.         public System.Threading.Tasks.Task<string> getStateAsync()
  97.         {
  98.             return base.Channel.getStateAsync();
  99.         }
  100.        
  101.         public System.Threading.Tasks.Task<string> getSeedAsync()
  102.         {
  103.            
  104.             return base.Channel.getSeedAsync();
  105.         }
  106.  
  107.         public System.Threading.Tasks.Task<string> getVersionMayorAsync()
  108.         {
  109.             return base.Channel.getVersionMayorAsync();
  110.         }
  111.        
  112.         public System.Threading.Tasks.Task<string> getVersionMenorAsync()
  113.         {
  114.             return base.Channel.getVersionMenorAsync();
  115.         }
  116.        
  117.         public System.Threading.Tasks.Task<string> getVersionPatchAsync()
  118.         {
  119.             return base.Channel.getVersionPatchAsync();
  120.         }
  121.        
  122.         public virtual System.Threading.Tasks.Task OpenAsync()
  123.         {
  124.             return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
  125.         }
  126.        
  127.         public virtual System.Threading.Tasks.Task CloseAsync()
  128.         {
  129.             return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndClose));
  130.         }
  131.        
  132.         private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
  133.         {
  134.             if ((endpointConfiguration == EndpointConfiguration.CrSeed))
  135.             {
  136.                 System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
  137.                 result.MaxBufferSize = int.MaxValue;
  138.                 result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
  139.                 result.MaxReceivedMessageSize = int.MaxValue;
  140.                 result.AllowCookies = true;
  141.                 result.Security.Mode = System.ServiceModel.BasicHttpSecurityMode.Transport;
  142.                 return result;
  143.             }
  144.             throw new System.InvalidOperationException(string.Format("No se pudo encontrar un punto de conexión con el nombre \"{0}\".", endpointConfiguration));
  145.         }
  146.        
  147.         private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration)
  148.         {
  149.             if ((endpointConfiguration == EndpointConfiguration.CrSeed))
  150.             {
  151.                 return new System.ServiceModel.EndpointAddress("https://maullin.sii.cl/DTEWS/CrSeed.jws");
  152.             }
  153.             throw new System.InvalidOperationException(string.Format("No se pudo encontrar un punto de conexión con el nombre \"{0}\".", endpointConfiguration));
  154.         }
  155.        
  156.         private static System.ServiceModel.Channels.Binding GetDefaultBinding()
  157.         {
  158.             return CrSeedClient.GetBindingForEndpoint(EndpointConfiguration.CrSeed);
  159.         }
  160.        
  161.         private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
  162.         {
  163.             return CrSeedClient.GetEndpointAddress(EndpointConfiguration.CrSeed);
  164.         }
  165.        
  166.         public enum EndpointConfiguration
  167.         {
  168.            
  169.             CrSeed,
  170.         }
  171.     }
  172. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement