wsdl-tsclient
wsdl-tsclient copied to clipboard
Way to do pre action before sending soap request
Is there a way where we can do something before sending the soap message? In my use case, I need to get the soap body and then use this to generate an authorization header.
const client = await createClientAsync("wsdl path");
// get soap body
// do something
client.addHttpHeader('Authorization', 'something generated based on key and soap body') // add soap header
client.CallSoapMethodAsync();
You may want to look into node-soap Client. The client returned by this library is essentially that.