nestjs-soap
nestjs-soap copied to clipboard
Create multiple clients in a single module
Hi everyone,
Is there a feature to create multiple SOAP clients with separate configs in a single module? As I've seen in the examples in documentation, there were only cases with a single client. I could have a workaround with separate modules for each service, but it seems redundant to me.
I am talking about something like this:
SoapModule.registerAsync([ { clientName: 'WSDL1_SOAP_CLIENT', inject: [ConfigService], useFactory(configService: ConfigService) { return { uri: configService.get('WSDL1_URL'), }; }, }, { clientName: 'WSDL2_SOAP_CLIENT', inject: [ConfigService], useFactory(configService: ConfigService) { return { uri: configService.get('WSDL2_URL'), }; }, } ])