Sorry for the late response.
The different in serialization formats you are seeing between v2 and v3 is because the two versions have different defaults for the RETURN XML clause. In v2 the default is RETURN XML AUTO, which format uses the entity and property aliases as the XML element names. It also uses a hierarchical format when the query uses navigation properties. In v3 the default is RETURN XML RAW, which uses fixed XML element names that are unrelated to the aliases used in the query. They are "row" and "c0", "c1", "c2", etc.
Both services support both formats, they just have a different default when the query does not request a specific output format. To request the AUTO format that your existing scripts expect, just append "RETURN XML AUTO" to the query.
You are correct about the port numbers: 17777 uses Microsoft's proprietary net.tcp "binary xml" protocol (with TLS encryption for privacy), which is more efficient than SOAP over HTTPS but not interoperable with runtimes other than .NET. 17778 offers the same services over standard SOAP/HTTPS.