Quantcast
Channel: Spring Community Forums - Data
Viewing all articles
Browse latest Browse all 297

Serialize a Page to XML

$
0
0
I'm working on a webservice that uses an elastic search repository. I have a controller with two methods that return data about stores. One returns Page<Store>, the other just returns a single Store. Each method is annotated to produce both application/json and application/xml; however, only the method returning a single Store object will produce xml. The method returning Page<Store> results in an "Error 406 Not Acceptable" message when I ask for xml in my Accept header, json works fine.

I've been googling for hours, but I haven't been able to get past it. This stackexchange question seems to be close to mine, but has gone unanswered: http://stackoverflow.com/questions/1...sey-using-jaxb

Is there an annotation I might be missing somewhere that is preventing me from being able to serialize the Page<Store> to XML?

Viewing all articles
Browse latest Browse all 297

Trending Articles