Okay, I thought setting output to application/xml but wrap=no will mean the person writing the query is taking the responsibility that they do not want results to be wrapped but know the result is xml so forcing the output to be application/xml (so that the response mime-type is set to application/xml in this case)...what are the valid values for output parameter?
An invocation like http://localhost:8984/basex/jax-rx?wrap=no&query=1+to+10&output=text... or http://localhost:8984/basex/jax-rx?wrap=yes&query=1+to+10&output=tex... text%2Fxml) results in:
[SERE0000] Parameter "text/xml" is unknown.
What I am after is something akin to this (but with numerous <Data> elements, so do not want wrapping in jax-rx:result elements as that adds unnecessarily to payload (bytes transferred) when I do not need it): http://localhost:8984/basex/jax-rx?wrap=no&query=%3CData%3E1%20to%2010%3... with a return mime-type of text/xml or application/xml.
So, basically, I want to return an "XML" result without the enclosing jax-rx:results/jax-rx:result elements.
Perhaps I can just discard the jax-rx:results/jax-rx:result elements while parsing the response...I am alright with it even if BaseX does not cater to this scenario.
On Fri, Jan 28, 2011 at 4:43 PM, Christian Grün christian.gruen@gmail.comwrote:
Brilliant, thanks. However, I also want to change the returned type to application/xml or text/xml
As you correctly observed, the JAX-RX interface returns text/plain as return type if wrapping is turned off. This decision has been taken as it can't be assured that the result will be correct XML, or XML at all. See the following query as example:
http://localhost:8984/basex/jax-rx?wrap=no&query=1+to+10
and the parameter named output as documented does not appear to be supported in ver 6.5 on the maven repo
The "output" parameter has always been supported in BaseX; could you provide us with a query that demonstrates the problem?
Christian