Rest: replace use of XML.marshall in rest api