This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Web Services and the fly likes How can I get the XML response with RestAssured? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "How can I get the XML response with RestAssured?" Watch "How can I get the XML response with RestAssured?" New topic
Author

How can I get the XML response with RestAssured?

pasquale vitale
Greenhorn

Joined: Aug 22, 2008
Posts: 10
Hi all,

I've this Rest service class with annotation:



and I'm using this code to call the service:



It works, but the response is json. If I remove the annotation MediaType.APPLICATION_JSON in the @Produces, I get the XML response.
How can I get the XML response from above code whitout change @Produces?

Thank you and regards
pasquy73


 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How can I get the XML response with RestAssured?