#SB-137: Implement artifact searches via REST with XML/JSON results

- Made the XMLStreamWriter flush.