nestjs-soap icon indicating copy to clipboard operation
nestjs-soap copied to clipboard

Create multiple clients in a single module

Open timurkayzer opened this issue 9 months ago • 0 comments

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'), }; }, } ])

timurkayzer avatar May 03 '24 11:05 timurkayzer