protected ReqWriter newReqWriter(XmlRpcRequest pRequest) throws XmlRpcException, IOException, SAXException { request = pRequest; return super.newReqWriter(pRequest); }
protected ReqWriter newReqWriter(XmlRpcRequest pRequest) throws XmlRpcException, IOException, SAXException { request = pRequest; return super.newReqWriter(pRequest); }
protected ReqWriter newReqWriter(XmlRpcRequest pRequest) throws XmlRpcException, IOException, SAXException { request = pRequest; return super.newReqWriter(pRequest); }
public Object sendRequest(XmlRpcRequest pRequest) throws XmlRpcException { XmlRpcStreamRequestConfig config = (XmlRpcStreamRequestConfig) pRequest.getConfig(); boolean closed = false; try { ReqWriter reqWriter = newReqWriter(pRequest); writeRequest(reqWriter); InputStream istream = getInputStream(); if (isResponseGzipCompressed(config)) { istream = new GZIPInputStream(istream); } Object result = readResponse(config, istream); closed = true; close(); return result; } catch (IOException e) { throw new XmlRpcException("Failed to read server's response: " + e.getMessage(), e); } catch (SAXException e) { Exception ex = e.getException(); if (ex != null && ex instanceof XmlRpcException) { throw (XmlRpcException) ex; } throw new XmlRpcException("Failed to generate request: " + e.getMessage(), e); } finally { if (!closed) { try { close(); } catch (Throwable ignore) {} } } }
public Object sendRequest(XmlRpcRequest pRequest) throws XmlRpcException { XmlRpcStreamRequestConfig config = (XmlRpcStreamRequestConfig) pRequest.getConfig(); boolean closed = false; try { ReqWriter reqWriter = newReqWriter(pRequest); writeRequest(reqWriter); InputStream istream = getInputStream(); if (isResponseGzipCompressed(config)) { istream = new GZIPInputStream(istream); } Object result = readResponse(config, istream); closed = true; close(); return result; } catch (IOException e) { throw new XmlRpcException("Failed to read servers response: " + e.getMessage(), e); } catch (SAXException e) { Exception ex = e.getException(); if (ex != null && ex instanceof XmlRpcException) { throw (XmlRpcException) ex; } throw new XmlRpcException("Failed to generate request: " + e.getMessage(), e); } finally { if (!closed) { try { close(); } catch (Throwable ignore) {} } } }
public Object sendRequest(XmlRpcRequest pRequest) throws XmlRpcException { XmlRpcStreamRequestConfig config = (XmlRpcStreamRequestConfig) pRequest.getConfig(); boolean closed = false; try { ReqWriter reqWriter = newReqWriter(pRequest); writeRequest(reqWriter); InputStream istream = getInputStream(); if (isResponseGzipCompressed(config)) { istream = new GZIPInputStream(istream); } Object result = readResponse(config, istream); closed = true; close(); return result; } catch (IOException e) { throw new XmlRpcException("Failed to read server's response: " + e.getMessage(), e); } catch (SAXException e) { Exception ex = e.getException(); if (ex != null && ex instanceof XmlRpcException) { throw (XmlRpcException) ex; } throw new XmlRpcException("Failed to generate request: " + e.getMessage(), e); } finally { if (!closed) { try { close(); } catch (Throwable ignore) {} } } }
public Object sendRequest(XmlRpcRequest pRequest) throws XmlRpcException { XmlRpcStreamRequestConfig config = (XmlRpcStreamRequestConfig) pRequest.getConfig(); boolean closed = false; try { ReqWriter reqWriter = newReqWriter(pRequest); writeRequest(reqWriter); InputStream istream = getInputStream(); if (isResponseGzipCompressed(config)) { istream = new GZIPInputStream(istream); } Object result = readResponse(config, istream); closed = true; close(); return result; } catch (IOException e) { throw new XmlRpcException("Failed to read server's response: " + e.getMessage(), e); } catch (SAXException e) { Exception ex = e.getException(); if (ex != null && ex instanceof XmlRpcException) { throw (XmlRpcException) ex; } throw new XmlRpcException("Failed to generate request: " + e.getMessage(), e); } finally { if (!closed) { try { close(); } catch (Throwable ignore) {} } } }
public Object sendRequest(XmlRpcRequest pRequest) throws XmlRpcException { XmlRpcStreamRequestConfig config = (XmlRpcStreamRequestConfig) pRequest.getConfig(); boolean closed = false; try { ReqWriter reqWriter = newReqWriter(pRequest); writeRequest(reqWriter); InputStream istream = getInputStream(); if (isResponseGzipCompressed(config)) { istream = new GZIPInputStream(istream); } Object result = readResponse(config, istream); closed = true; close(); return result; } catch (IOException e) { throw new XmlRpcException("Failed to read server's response: " + e.getMessage(), e); } catch (SAXException e) { Exception ex = e.getException(); if (ex != null && ex instanceof XmlRpcException) { throw (XmlRpcException) ex; } throw new XmlRpcException("Failed to generate request: " + e.getMessage(), e); } finally { if (!closed) { try { close(); } catch (Throwable ignore) {} } } }
protected ReqWriter newReqWriter(XmlRpcRequest pRequest) throws XmlRpcException, IOException, SAXException { final XmlRpcHttpClientConfig config = (XmlRpcHttpClientConfig) pRequest.getConfig(); if (isUsingByteArrayOutput(config)) { ByteArrayReqWriter reqWriter = new ByteArrayReqWriter(pRequest); setContentLength(reqWriter.getContentLength()); if (isCompressingRequest(config)) { return new GzipReqWriter(reqWriter); } return reqWriter; } else { return super.newReqWriter(pRequest); } } }
protected ReqWriter newReqWriter(XmlRpcRequest pRequest) throws XmlRpcException, IOException, SAXException { final XmlRpcHttpClientConfig config = (XmlRpcHttpClientConfig) pRequest.getConfig(); if (isUsingByteArrayOutput(config)) { ByteArrayReqWriter reqWriter = new ByteArrayReqWriter(pRequest); setContentLength(reqWriter.getContentLength()); if (isCompressingRequest(config)) { return new GzipReqWriter(reqWriter); } return reqWriter; } else { return super.newReqWriter(pRequest); } } }
protected ReqWriter newReqWriter(XmlRpcRequest pRequest) throws XmlRpcException, IOException, SAXException { final XmlRpcHttpClientConfig config = (XmlRpcHttpClientConfig) pRequest.getConfig(); if (isUsingByteArrayOutput(config)) { ByteArrayReqWriter reqWriter = new ByteArrayReqWriter(pRequest); setContentLength(reqWriter.getContentLength()); if (isCompressingRequest(config)) { return new GzipReqWriter(reqWriter); } return reqWriter; } else { return super.newReqWriter(pRequest); } } }
protected ReqWriter newReqWriter(XmlRpcRequest pRequest) throws XmlRpcException, IOException, SAXException { final XmlRpcHttpClientConfig config = (XmlRpcHttpClientConfig) pRequest.getConfig(); if (isUsingByteArrayOutput(config)) { ByteArrayReqWriter reqWriter = new ByteArrayReqWriter(pRequest); setContentLength(reqWriter.getContentLength()); if (isCompressingRequest(config)) { return new GzipReqWriter(reqWriter); } return reqWriter; } else { return super.newReqWriter(pRequest); } } }