public void writeRequest(OutputStream out) throws IOException { if (CommonsHttpMessageSender.isGzipRequestEnabled(context)) { out = new GZIPOutputStream(out); } try { Attachments atts = message.getAttachments(); if (atts != null) { atts.write(out); } else { HttpChannel.writeWithoutAttachments(context, message, out); } } catch (XFireException e) { log.error("Couldn't send message.", e); throw new IOException(e.getMessage()); } out.close(); }
throw new IOException(e.getMessage());