Rest: Passing an array of xml payload request -


इस तरह एक नियंत्रक विधि है:

  @ POST @ path ("/ {id } "@Consumes ({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) @Produces ({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) सार्वजनिक प्रतिक्रिया postEntities (अंतिम डोमेन [] डोमेन, @PathParam (" id ") अंतिम लांग आईडी)  

अगर मैं डोमेन की एक JSON सरणी पास करता हूं तो यह ठीक काम करता है और मार्शल ठीक काम करता है। लेकिन XML अनुरोधों के लिए मैंने & lt; डोमेन & gt; & lt; / domain & gt; आसपास & lt; डोमेन & gt; & lt; / डोमेन & gt; , नियंत्रक फेंकता 204 - नहीं सामग्री वापस।
उदाहरण:

  & lt; डोमेन & gt; & LT; डोमेन & gt; । । । & Lt; / डोमेन & gt; & LT; डोमेन & gt; । । । & Lt; / डोमेन & gt; & Lt; / डोमेन & gt;  


Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -