In XenServer to reach the VNC console firstly you have to perform HTTP CONNECT method. It will do the authentication (that's why the session id is required). After successful CONNECT the TCP stream can be used as VNC connection.