wsdl-tsclient icon indicating copy to clipboard operation
wsdl-tsclient copied to clipboard

Way to do pre action before sending soap request

Open neilpalima opened this issue 2 years ago • 1 comments

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();

neilpalima avatar Jan 06 '23 10:01 neilpalima

You may want to look into node-soap Client. The client returned by this library is essentially that.

gomain avatar Jan 07 '23 16:01 gomain