Beispiel #1
0
        public OpcionalTipoResponse GetTiposOpcional(FEAuthRequest feAuthRequest)
        {
            AfipWrapperServiceClient client = new AfipWrapperServiceClient();

            ClientCredentialHelper.SetCredentials(client.ClientCredentials);
            try
            {
                var t = client.GetTiposOpcional(feAuthRequest);
                client.Close();
                return(t);
            }
            catch
            {
                if (client.State != System.ServiceModel.CommunicationState.Closed)
                {
                    client.Abort();
                }

                throw;
            }
        }
Beispiel #2
0
        public ClsFEXAuthRequest ObtenerTicketFex()
        {
            AfipWrapperServiceClient client = new AfipWrapperServiceClient();

            ClientCredentialHelper.SetCredentials(client.ClientCredentials);
            try
            {
                var t = client.ObtenerTicketFex();
                client.Close();
                return(t);
            }
            catch
            {
                if (client.State != System.ServiceModel.CommunicationState.Closed)
                {
                    client.Abort();
                }

                throw;
            }
            return(null);
        }