Added support for XML serialization

Now the REST-like methods can receive and send XML data