Package org.apache.axis

Examples of org.apache.axis.Message.writeTo()


                            .getBytes(HTTPConstants.HEADER_DEFAULT_CHAR_ENCODING));
                }
                if(baos != null) {
                    out = new TeeOutputStream(out, baos);
                }
                reqMessage.writeTo(out);
            } catch (SOAPException e) {
                log.error(Messages.getMessage("exception00"), e);
            }
            // Flush ONLY once.
            out.flush();
View Full Code Here


        msg.addHeader(HTTPConstants.HEADER_SOAP_ACTION, action);
        msg.setDisposition(MimePart.INLINE);
        msg.setSubject(id);

        ByteArrayOutputStream out = new ByteArrayOutputStream(8 * 1024);
        reqMessage.writeTo(out);
        msg.setContent(out.toString(), reqMessage.getContentType(msgContext.getSOAPConstants()));

        ByteArrayOutputStream out2 = new ByteArrayOutputStream(8 * 1024);
        msg.writeTo(out2);

View Full Code Here

        }
        if (httpChunkStream) {
            ChunkedOutputStream chunkedOutputStream = new ChunkedOutputStream(out);
            out = new BufferedOutputStream(chunkedOutputStream, 8 * 1024);
            try {
                reqMessage.writeTo(out);
            } catch (SOAPException e) {
                log.error(Messages.getMessage("exception00"), e);
            }
            out.flush();
            chunkedOutputStream.eos();
View Full Code Here

        } else {
            out = new BufferedOutputStream(out, 8 * 1024);
            try {
                out.write(header.toString()
                        .getBytes(HTTPConstants.HEADER_DEFAULT_CHAR_ENCODING));
                reqMessage.writeTo(out);
            } catch (SOAPException e) {
                log.error(Messages.getMessage("exception00"), e);
            }
            // Flush ONLY once.
            out.flush();
View Full Code Here

            addContextInfo(method, conn, state, msgContext, targetURL);
            Message reqMessage = msgContext.getRequestMessage();
            ByteArrayOutputStream baos = new ByteArrayOutputStream();

            reqMessage.writeTo(baos);
            method.setRequestBody(new String(baos.toByteArray(), "UTF-8"));
            method.execute(state, conn);
            int returnCode = method.getStatusCode();
            String contentType = null;
            String contentLocation = null;
View Full Code Here

            Destination destination = message.getJMSReplyTo();
            if(destination == null)
                return;
            JMSEndpoint replyTo = listener.getConnector().createEndpoint(destination);
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            msg.writeTo(out);
            replyTo.send(out.toByteArray());
        }
        catch(Exception e)
        {
            e.printStackTrace();
View Full Code Here

                // OH, THE HUMILITY!  yes this is inefficient.
                out.write(cookieOut.toString().getBytes());
            }

            out.write(SEPARATOR);
            responseMsg.writeTo(out);
            // out.write(response);
            out.flush();
        } catch (Exception e) {
            log.debug(Messages.getMessage("exception00"), e);
        } finally {
View Full Code Here

            /*
             * This is not the most efficient way to deserialize the result
             * but could not find better or more reliable way to do this.
             */
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            resMsg.writeTo(out);
            ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());

            DeserializationContext dser =
                new DeserializationContext(new InputSource(in), resMsg.getMessageContext(), null);
            dser.parse();
View Full Code Here

            Message reqMessage = msgContext.getRequestMessage();
            if(posting) {
                method = new PostMethod(targetURL.toString());
                addContextInfo(method, httpClient, msgContext, targetURL);
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                reqMessage.writeTo(baos);
                ((PostMethod)method).setRequestBody(new ByteArrayInputStream(baos.toByteArray()));
                ((PostMethod)method).setUseExpectHeader(false); // workaround for
            } else {
                method = new GetMethod(targetURL.toString());
                addContextInfo(method, httpClient, msgContext, targetURL);
View Full Code Here

            out = new BufferedOutputStream(chunkedOutputStream, Constants.HTTP_TXR_BUFFER_SIZE);
            try {
                if(baos != null) {
                    out = new TeeOutputStream(out, baos);
                }
                reqMessage.writeTo(out);
            } catch (SOAPException e) {
                log.error(Messages.getMessage("exception00"), e);
            }
            out.flush();
            chunkedOutputStream.eos();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.