I haven't used soap until now. I'm using node-soap library (https://github.com/vpulim/node-soap).
I want to communicate with soap server. To maintain the session the server sends me set-cookie response header: 'ASP.NET_SessionID=55....hrc; path/; HttpOnly'
with the Login method response. I want to send this cookie back in a Logout method request.
I try: client.addHttpHeader('Cookie', 'ASP.NET_SessionID=55....hrc');
But on subsequent:
client.LogoutAsync({})
.then(result => {console.log(result);})
.catch(error => {console.log(error);});
I get an error:
events.js:183 throw er; //Unhandled 'error' event
What's going on here, and how can I send back Cookie header?
P.S. Wihtout cookie it works as expected returning me Logout: false
, meaning the error occured because it didn't recognized session (I suppose).