public long getContentLength() { if (chunked) { return -1; } if (bytes == null) { try { bytes = messageFormatter.getBytes(messageContext, format); } catch (AxisFault e) { return -1; } } return bytes.length; }
public byte[] getBytes(MessageContext messageContext, OMOutputFormat format) throws AxisFault { return messageFormatter.getBytes(messageContext, format); }
public byte[] getBytes(MessageContext messageContext, OMOutputFormat format) throws AxisFault { return messageFormatter.getBytes(messageContext, format); }
public InputStream getRequestEntityContent() throws IOException { return new ByteArrayInputStream(messageFormatter.getBytes(messageContext, format)); }
private void writeOut(MessageContext msgContext, Socket socket, String contentType) throws IOException { MessageFormatter messageFormatter = MessageProcessorSelector.getMessageFormatter(msgContext); OMOutputFormat format = BaseUtils.getOMOutputFormat(msgContext); format.setContentType(contentType); byte[] payload = messageFormatter.getBytes(msgContext, format); OutputStream out = socket.getOutputStream(); out.write(payload); out.flush(); }
public void writeRequest(OutputStream outStream) throws IOException { Object gzip = messageContext.getOptions().getProperty(HTTPConstants.MC_GZIP_REQUEST); if (gzip != null && JavaUtils.isTrueExplicitly(gzip) && chunked) { outStream = new GZIPOutputStream(outStream); } try { if (chunked) { messageFormatter.writeTo(messageContext, format, outStream, isAllowedRetry); } else { if (bytes == null) { bytes = messageFormatter.getBytes(messageContext, format); } outStream.write(bytes); } if (outStream instanceof GZIPOutputStream) { ((GZIPOutputStream) outStream).finish(); } outStream.flush(); } catch (FactoryConfigurationError e) { throw AxisFault.makeFault(e); } catch (IOException e) { throw AxisFault.makeFault(e); } }
OMOutputFormat format = BaseUtils.getOMOutputFormat(msgContext); format.setContentType(udpOutInfo.getContentType()); byte[] payload = messageFormatter.getBytes(msgContext, format); try { DatagramSocket socket = new DatagramSocket();
OMOutputFormat format = BaseUtils.getOMOutputFormat(msgContext); format.setContentType(udpOutInfo.getContentType()); byte[] payload = messageFormatter.getBytes(msgContext, format); try { DatagramSocket socket = new DatagramSocket();
try { out = new GZIPOutputStream(out); out.write(messageFormatter.getBytes(msgContext, format)); ((GZIPOutputStream) out).finish(); out.flush();