throw new XmlRpcClientException("Failed to read server's response: " + e.getMessage(), e); if (xp.isSuccess()) { return xp.getResult(); Throwable t = xp.getErrorCause(); if (t == null) { throw new XmlRpcException(xp.getErrorCode(), xp.getErrorMessage()); throw (RuntimeException) t; throw new XmlRpcException(xp.getErrorCode(), xp.getErrorMessage(), t);
throw new SAXParseException("Expected /methodResponse element, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected /" + tag + " element, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected /param, got " + new QName(pURI, pLocalName), getDocumentLocator()); endValueTag(); } else { throw new SAXParseException("Expected /value, got " + new QName(pURI, pLocalName), getDocumentLocator()); if (isSuccess) { if ("".equals(pURI) && "value".equals(pLocalName)) { endValueTag(); } else { throw new SAXParseException("Expected /value, got " + new QName(pURI, pLocalName), getDocumentLocator());
protected Object readResponse(XmlRpcStreamRequestConfig pConfig, InputStream pStream) throws XmlRpcException { InputSource isource = new InputSource(pStream); XMLReader xr = newXMLReader(); XmlRpcResponseParser xp; try { xp = new XmlRpcResponseParser(pConfig, getClient().getTypeFactory()); xr.setContentHandler(xp); xr.parse(isource); } catch (SAXException e) { throw new XmlRpcClientException("Failed to parse servers response: " + e.getMessage(), e); } catch (IOException e) { throw new XmlRpcClientException("Failed to read servers response: " + e.getMessage(), e); } if (xp.isSuccess()) { return xp.getResult(); } else { throw new XmlRpcException(xp.getErrorCode(), xp.getErrorMessage()); } } }
throw new SAXParseException("Expected methodResponse element, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected params or fault element, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected param element, got " + new QName(pURI, pLocalName), getDocumentLocator()); startValueTag(); } else { throw new SAXParseException("Expected value element, got " + new QName(pURI, pLocalName), getDocumentLocator()); if (isSuccess) { if ("".equals(pURI) && "value".equals(pLocalName)) { startValueTag(); } else { throw new SAXParseException("Expected value element, got " + new QName(pURI, pLocalName), getDocumentLocator());
Integer faultCode = (Integer) map.get("faultCode"); if (faultCode == null) { throw new SAXParseException("Missing faultCode", getDocumentLocator()); } catch (NumberFormatException e) { throw new SAXParseException("Invalid faultCode: " + faultCode, getDocumentLocator());
throw new SAXParseException("Expected methodResponse element, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected params or fault element, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected param element, got " + new QName(pURI, pLocalName), getDocumentLocator()); startValueTag(); } else { throw new SAXParseException("Expected value element, got " + new QName(pURI, pLocalName), getDocumentLocator()); if (isSuccess) { if ("".equals(pURI) && "value".equals(pLocalName)) { startValueTag(); } else { throw new SAXParseException("Expected value element, got " + new QName(pURI, pLocalName), getDocumentLocator());
Integer faultCode = (Integer) map.get("faultCode"); if (faultCode == null) { throw new SAXParseException("Missing faultCode", getDocumentLocator()); } catch (NumberFormatException e) { throw new SAXParseException("Invalid faultCode: " + faultCode, getDocumentLocator());
protected Object readResponse(XmlRpcStreamRequestConfig pConfig, InputStream pStream) throws XmlRpcException { InputSource isource = new InputSource(pStream); XMLReader xr = newXMLReader(); XmlRpcResponseParser xp; try { xp = new XmlRpcResponseParser(pConfig, getClient().getTypeFactory()); 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); } if (xp.isSuccess()) { return xp.getResult(); } Throwable t = xp.getErrorCause(); if (t == null) { throw new XmlRpcException(xp.getErrorCode(), xp.getErrorMessage()); } if (t instanceof XmlRpcException) { throw (XmlRpcException) t; } if (t instanceof RuntimeException) { throw (RuntimeException) t; } throw new XmlRpcException(xp.getErrorCode(), xp.getErrorMessage(), t); } }
throw new SAXParseException("Expected /methodResponse element, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected /" + tag + " element, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected /param, got " + new QName(pURI, pLocalName), getDocumentLocator()); endValueTag(); } else { throw new SAXParseException("Expected /value, got " + new QName(pURI, pLocalName), getDocumentLocator()); if (isSuccess) { if ("".equals(pURI) && "value".equals(pLocalName)) { endValueTag(); } else { throw new SAXParseException("Expected /value, got " + new QName(pURI, pLocalName), getDocumentLocator());
throw new SAXParseException("Expected methodResponse element, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected params or fault element, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected param element, got " + new QName(pURI, pLocalName), getDocumentLocator()); startValueTag(); } else { throw new SAXParseException("Expected value element, got " + new QName(pURI, pLocalName), getDocumentLocator()); if (isSuccess) { if ("".equals(pURI) && "value".equals(pLocalName)) { startValueTag(); } else { throw new SAXParseException("Expected value element, got " + new QName(pURI, pLocalName), getDocumentLocator());
Integer faultCode = (Integer) map.get("faultCode"); if (faultCode == null) { throw new SAXParseException("Missing faultCode", getDocumentLocator()); } catch (NumberFormatException e) { throw new SAXParseException("Invalid faultCode: " + faultCode, getDocumentLocator());
protected Object readResponse(XmlRpcStreamRequestConfig pConfig, InputStream pStream) throws XmlRpcException { InputSource isource = new InputSource(pStream); XMLReader xr = newXMLReader(); XmlRpcResponseParser xp; try { xp = new XmlRpcResponseParser(pConfig, getClient().getTypeFactory()); 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); } if (xp.isSuccess()) { return xp.getResult(); } Throwable t = xp.getErrorCause(); if (t == null) { throw new XmlRpcException(xp.getErrorCode(), xp.getErrorMessage()); } if (t instanceof XmlRpcException) { throw (XmlRpcException) t; } if (t instanceof RuntimeException) { throw (RuntimeException) t; } throw new XmlRpcException(xp.getErrorCode(), xp.getErrorMessage(), t); } }
throw new SAXParseException("Expected /methodResponse element, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected /" + tag + " element, got " + new QName(pURI, pLocalName), getDocumentLocator()); throw new SAXParseException("Expected /param, got " + new QName(pURI, pLocalName), getDocumentLocator()); endValueTag(); } else { throw new SAXParseException("Expected /value, got " + new QName(pURI, pLocalName), getDocumentLocator()); if (isSuccess) { if ("".equals(pURI) && "value".equals(pLocalName)) { endValueTag(); } else { throw new SAXParseException("Expected /value, got " + new QName(pURI, pLocalName), getDocumentLocator());
protected Object readResponse(XmlRpcStreamRequestConfig pConfig, InputStream pStream) throws XmlRpcException { InputSource isource = new InputSource(pStream); XMLReader xr = newXMLReader(); XmlRpcResponseParser xp; try { xp = new XmlRpcResponseParser(pConfig, getClient().getTypeFactory()); 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); } if (xp.isSuccess()) { return xp.getResult(); } Throwable t = xp.getErrorCause(); if (t == null) { throw new XmlRpcException(xp.getErrorCode(), xp.getErrorMessage()); } if (t instanceof XmlRpcException) { throw (XmlRpcException) t; } if (t instanceof RuntimeException) { throw (RuntimeException) t; } throw new XmlRpcException(xp.getErrorCode(), xp.getErrorMessage(), t); } }
protected Object readResponse(XmlRpcStreamRequestConfig pConfig, InputStream pStream) throws XmlRpcException { InputSource isource = new InputSource(pStream); isource.setEncoding(pConfig.getEncoding()); //jl XMLReader xr = newXMLReader(); XmlRpcResponseParser xp; try { xp = new XmlRpcResponseParser(pConfig, getClient().getTypeFactory()); 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); } if (xp.isSuccess()) { return xp.getResult(); } Throwable t = xp.getErrorCause(); if (t == null) { throw new XmlRpcException(xp.getErrorCode(), xp.getErrorMessage()); } if (t instanceof XmlRpcException) { throw (XmlRpcException) t; } if (t instanceof RuntimeException) { throw (RuntimeException) t; } throw new XmlRpcException(xp.getErrorCode(), xp.getErrorMessage(), t); } }