It's req.ToXml, not req.ToXML.

See https://github.com/astaxie/beego/blob/develop/httplib/httplib.go
for reference.