use of org.apache.xmlrpc.parser.XmlRpcRequestParser in project camel by apache.
the class XmlRpcDataFormat method unmarshalRequest.
protected Object unmarshalRequest(Exchange exchange, InputStream stream) throws Exception {
InputSource isource = new InputSource(stream);
XMLReader xr = newXMLReader();
XmlRpcRequestParser xp;
try {
xp = new XmlRpcRequestParser(xmlRpcStreamRequestConfig, typeFactory);
xr.setContentHandler(xp);
xr.parse(isource);
} catch (SAXException e) {
throw new XmlRpcClientException("Failed to parse server's response: " + e.getMessage(), e);
} catch (IOException e) {
throw new XmlRpcClientException("Failed to read server's response: " + e.getMessage(), e);
}
return new XmlRpcRequestImpl(xp.getMethodName(), xp.getParams());
}
Aggregations