Package org.apache.axis

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


        } 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


        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

            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.write(cookieOut.toString().getBytes());
            }

            out.write(SEPARATOR);
            if (responseMsg != null)
                responseMsg.writeTo(out);
            // out.write(response);
            out.flush();
        } catch (Exception e) {
            log.debug(Messages.getMessage("exception00"), e);
        } finally {
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

        }
        if (httpChunkStream) {
            ChunkedOutputStream chunkedOutputStream = new ChunkedOutputStream(out);
            out = new BufferedOutputStream(chunkedOutputStream, Constants.HTTP_TXR_BUFFER_SIZE);
            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, Constants.HTTP_TXR_BUFFER_SIZE);
            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

            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

               out.write( headerEnder );
               out.write( responseHeader.getValue(  ).getBytes(  ) );
            }

            out.write( SEPARATOR );
            responseMsg.writeTo( out );
         }

         // out.write(response);
         out.flush(  );
      }
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.