public String getMethodName() { return parser.getMethodName(); } public int getParameterCount() {
protected XmlRpcRequest getRequest(final XmlRpcStreamRequestConfig pConfig, InputStream pStream) throws XmlRpcException { final XmlRpcRequestParser parser = new XmlRpcRequestParser(pConfig, getTypeFactory()); final XMLReader xr = SAXParsers.newXMLReader(); xr.setContentHandler(parser); try { xr.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); xr.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); xr.setFeature("http://xml.org/sax/features/external-general-entities", false); xr.setFeature("http://xml.org/sax/features/external-parameter-entities", false); xr.parse(new InputSource(pStream)); } catch (SAXException | IOException e) { throw new XmlRpcException("Failed to parse / read XML-RPC request: " + e.getMessage(), e); } final List<?> params = parser.getParams(); return new XmlRpcRequest() { public XmlRpcRequestConfig getConfig() { return pConfig; } public String getMethodName() { return parser.getMethodName(); } public int getParameterCount() { return params == null ? 0 : params.size(); } public Object getParameter(int pIndex) { return params.get(pIndex); } }; }
throw new SAXParseException("Expected /methodName, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected /params, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected /param, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected /value, got " + new QName(pURI, pLocalName), getDocumentLocator()); endValueTag(); break; default:
throw new SAXParseException("Expected root element 'methodCall', got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected methodName element, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected params element, got " + new QName(pURI, pLocalName), getDocumentLocator()); getDocumentLocator()); throw new SAXParseException("Expected param element, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected value element, got " + new QName(pURI, pLocalName), getDocumentLocator()); startValueTag(); break; default:
protected XmlRpcRequest getRequest(final XmlRpcStreamRequestConfig pConfig, InputStream pStream) throws XmlRpcException { final XmlRpcRequestParser parser = new XmlRpcRequestParser(pConfig, getTypeFactory()); final XMLReader xr = SAXParsers.newXMLReader(); xr.setContentHandler(parser); try { xr.parse(new InputSource(pStream)); } catch (SAXException e) { Exception ex = e.getException(); if (ex != null && ex instanceof XmlRpcException) { throw (XmlRpcException) ex; } throw new XmlRpcException("Failed to parse XML-RPC request: " + e.getMessage(), e); } catch (IOException e) { throw new XmlRpcException("Failed to read XML-RPC request: " + e.getMessage(), e); } final List params = parser.getParams(); return new XmlRpcRequest(){ public XmlRpcRequestConfig getConfig() { return pConfig; } public String getMethodName() { return parser.getMethodName(); } public int getParameterCount() { return params == null ? 0 : params.size(); } public Object getParameter(int pIndex) { return params.get(pIndex); } }; }
throw new SAXParseException("Expected /methodName, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected /params, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected /param, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected /value, got " + new QName(pURI, pLocalName), getDocumentLocator()); endValueTag(); break; default:
throw new SAXParseException("Expected root element 'methodCall', got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected methodName element, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected params element, got " + new QName(pURI, pLocalName), getDocumentLocator()); getDocumentLocator()); throw new SAXParseException("Expected param element, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected value element, got " + new QName(pURI, pLocalName), getDocumentLocator()); startValueTag(); break; default:
protected XmlRpcRequest getRequest(final XmlRpcStreamRequestConfig pConfig, InputStream pStream) throws XmlRpcException { final XmlRpcRequestParser parser = new XmlRpcRequestParser(pConfig, getTypeFactory()); final XMLReader xr = SAXParsers.newXMLReader(); xr.setContentHandler(parser); try { xr.parse(new InputSource(pStream)); } catch (SAXException e) { Exception ex = e.getException(); if (ex != null && ex instanceof XmlRpcException) { throw (XmlRpcException) ex; } throw new XmlRpcException("Failed to parse XML-RPC request: " + e.getMessage(), e); } catch (IOException e) { throw new XmlRpcException("Failed to read XML-RPC request: " + e.getMessage(), e); } final List params = parser.getParams(); return new XmlRpcRequest(){ public XmlRpcRequestConfig getConfig() { return pConfig; } public String getMethodName() { return parser.getMethodName(); } public int getParameterCount() { return params == null ? 0 : params.size(); } public Object getParameter(int pIndex) { return params.get(pIndex); } }; }
throw new SAXParseException("Expected /methodName, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected /params, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected /param, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected /value, got " + new QName(pURI, pLocalName), getDocumentLocator()); endValueTag(); break; default:
throw new SAXParseException("Expected root element 'methodCall', got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected methodName element, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected params element, got " + new QName(pURI, pLocalName), getDocumentLocator()); getDocumentLocator()); throw new SAXParseException("Expected param element, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected value element, got " + new QName(pURI, pLocalName), getDocumentLocator()); startValueTag(); break; default:
public String getMethodName() { return parser.getMethodName(); } public int getParameterCount() { return params == null ? 0 : params.size(); }
protected XmlRpcRequest getRequest(final XmlRpcStreamRequestConfig pConfig, InputStream pStream) throws XmlRpcException { final XmlRpcRequestParser parser = new XmlRpcRequestParser(pConfig, getTypeFactory()); final XMLReader xr = SAXParsers.newXMLReader(); xr.setContentHandler(parser); try { xr.parse(new InputSource(pStream)); } catch (SAXException e) { Exception ex = e.getException(); if (ex != null && ex instanceof XmlRpcException) { throw (XmlRpcException) ex; } throw new XmlRpcException("Failed to parse XML-RPC request: " + e.getMessage(), e); } catch (IOException e) { throw new XmlRpcException("Failed to read XML-RPC request: " + e.getMessage(), e); } final List params = parser.getParams(); return new XmlRpcRequest(){ public XmlRpcRequestConfig getConfig() { return pConfig; } public String getMethodName() { return parser.getMethodName(); } public int getParameterCount() { return params == null ? 0 : params.size(); } public Object getParameter(int pIndex) { return params.get(pIndex); } }; }
public String getMethodName() { return parser.getMethodName(); } public int getParameterCount() { return params == null ? 0 : params.size(); }
public String getMethodName() { return parser.getMethodName(); } public int getParameterCount() { return params == null ? 0 : params.size(); }