The WebSocket Script Service bundled with XWiki Standard doesn't provide a way to set the query string currently, but adding one afterwards doesn't break the connection.