public FECompConsultaResponse CompConsultar(FEAuthRequest feAuthRequest, FECompConsultaReq feCompConsultaReq) { AfipWrapperServiceClient client = new AfipWrapperServiceClient(); ClientCredentialHelper.SetCredentials(client.ClientCredentials); try { var t = client.CompConsultar(feAuthRequest, feCompConsultaReq); client.Close(); return(t); } catch { if (client.State != System.ServiceModel.CommunicationState.Closed) { client.Abort(); } throw; } }