}
return docBuilder.parse(inputStream);
} catch (ParserConfigurationException exception) {
throw new XmlRpcInternalException("Parser configuration exception",
exception);
} catch (SAXParseException exception) {
throw new XmlRpcNotWellFormedException("Line "
+ exception.getLineNumber() + " in XML-RPC payload is invalid",
exception);
} catch (SAXException exception) {
throw new XmlRpcNotWellFormedException("XML-RPC payload is invalid",
exception);
} catch (IOException exception) {
throw new XmlRpcInternalException(
"IOException when parsing XML-RPC payload", exception);
} finally {
if (inputStream != null) {
try {