I have a rest resource with a post method and need to both support json and xml. Everything works fine when the ‘Content-Type’-header is ‘application/json’ or ‘text/xml’ but I need to support ‘application/xml’ too. When the header is set to ‘application/xml’ I can’t access the content(body) of the request.
To get the content when the Content-Type header is set to ‘text/xml’ I need to add a object called ‘node’ and convert that to a document. I think I need to a similar trick to get ‘application/xml’ working, I just don’t know what.
Does anybody know how to solve this issue?
Thanks in advance,