Nodejs script that creates websocket and execute casperjs script, parse xml and return JSON