I have REST services that respond with unmarshalled domain entities. For example:
Request:
GET http://someAddress.com/customer/001
Response:
<customer>
<id>001</id>
<name>Some Guy</name>
...
</customer>
I would like to add some links to the response for discovering services. For example:
<customer>
<id>001</id>
<name>Some Guy</name>
...
<link xml:link="delete" href="http://someAddress.com/customer/001"/>
</customer>
The concern I have is if this will cause marshalling problems. I want the links discoverable, but I want consumers to use the domain schema easily, which does not contain elements for links.
Is it better to put the links elsewhere in the reply? If so, where?