if (charset==null) {
charset = "UTF-8";
}
try {
Reader r = new InputStreamReader(entity.getStream(),charset);
Parser parser = new Parser(getLogger());
Query query = parser.parseQuery(r);
r.close();
getResponse().setStatus(Status.SUCCESS_OK);
final QueryContext context = new QueryContext(getLogger(),app.getDB(),query);
final XMLRepresentationParser xmlParser = new XMLRepresentationParser();