I guess your trying to read the XML directly from the stream... Another way it can be done is through the GET and POST data. SAXBuilder trxBuilder = new SAXBuilder(false); Document trxDoc = trxBuilder.build(new StringReader(request.getParameter("xml")));