- ABP Framework version: v7.2.2
- UI type: Angular
- DB provider: MongoDB
- Tiered (MVC) or Identity Server Separated (Angular): yes
- Exception message and stack trace:
- Steps to reproduce the issue:"
I am trying to Call Saas Microservice from Other Abp Microservice and Want to use static Proxy generations. When I use Abp Cli to ceate static proxy It does not genrate Enum type under Dtos.
I get error in build as there is not type. Below ae all the files that are generated. can you Please advice how Can I generate static client proxy for Saas Microservice. I followed yours documented approach. Another issue is if we genrate these proxy under client module then we have to inject Http.Client module to Application module.. Its blocking development, and i will appreciate your response.
6 Answer(s)
-
0
hi
When I use Abp Cli to ceate static proxy It does not genrate Enum type under Dtos.
What was the command you were using?
abp generate-proxy ....
-
0
abp generate-proxy -t csharp -u https://localhost:44381/ -m Saas
And this is my saas Http.Client module code.
[DependsOn( typeof(AbpHttpClientModule), typeof(SaasServiceApplicationContractsModule), typeof(SaasTenantHttpApiClientModule), typeof(SaasHostHttpApiClientModule) )] public class SaasServiceHttpApiClientModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { context.Services.AddHttpClientProxies( typeof(SaasServiceApplicationContractsModule).Assembly, SaasServiceRemoteServiceConsts.RemoteServiceName ); } }
-
0
hi
I will try with your command. Wait a moment.
-
0
hi
I get error in build as there is not type.
Add
PlanDto
to yourDtos
folder.// This file is automatically generated by ABP framework to use MVC Controllers from CSharp using System; using Volo.Abp; using Volo.Abp.Application.Dtos; using Volo.Abp.Domain.Entities; [Serializable] public class PlanDto : ExtensibleEntityDto<Guid>, IHasConcurrencyStamp { public string Name { get; set; } public string ConcurrencyStamp { get; set; } }
-
0
I am trying to create Static proxy for TenantAppservice and all SaasHost Module. I dont get error with PlanDto but Enums that are part of TenantDtos.
I get issue with below ENUM which is part of Saas Domain shared module. Do I create these enums manually and they are not create as part or generation. `public enum TenantActivationState : byte { Active = 0,
ActiveWithLimitedTime = 1, Passive = 2
} `
Like this Dto use the above Enum
`public class SaasTenantDto : ExtensibleEntityDto
public Guid? EditionId { get; set; } public DateTime? EditionEndDateUtc { get; set; } public string EditionName { get; set; } public bool HasDefaultConnectionString { get; set; } public TenantActivationState ActivationState { get; set; } public DateTime? ActivationEndDate { get; set; } public string ConcurrencyStamp { get; set; }
}`
-
0