This code works, in some cases. If it returns console.log then the call to p.out functions just fine.
I\'ve set up a server listening on an SSL port. I am able to connect to it and with proper credentials I am able to access the services (echo service in the example below)