Package org.apache.axis

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


            sendError(response, e);
            throw new EventHandlerException(e.getMessage(), e);
        }

        try {
            msg.writeTo(response.getOutputStream());
            response.flushBuffer();
        } catch (IOException e) {
            throw new EventHandlerException("Cannot write to the output stream");
        } catch (SOAPException e) {
            throw new EventHandlerException("Cannot write message to the output stream");
View Full Code Here


        Message msg = new Message(obj);

        try {
            res.setContentType(msg.getContentType(Constants.DEFAULT_SOAP_VERSION));
            res.setContentLength(Integer.parseInt(Long.toString(msg.getContentLength())));
            msg.writeTo(res.getOutputStream());
            res.flushBuffer();
        } catch (Exception e) {
            throw new EventHandlerException(e.getMessage(), e);
        }
    }
View Full Code Here

            // up MIME attachements correctly. MIME attachments using
            // AxisJms still don't work, because it falls over later.
            message.getContentType(messageContext.getSOAPConstants());
           
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            message.writeTo(baos);
            String contents = baos.toString();

            if (asyncMode) {
                performAsyncSend(messageContext, dest, contents);
            } else {
View Full Code Here

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

                }
                if (baos != null)
                {
                    out = new TeeOutputStream(out, baos);
                }
                reqMessage.writeTo(out);
            }
            catch (SOAPException e)
            {
                throw e;
            }
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

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

            final DeserializationContext dser =
                new DeserializationContext(new InputSource(in), resMsg.getMessageContext(), null);
            dser.parse();
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.write(responseHeader.getValue().getBytes());
            }

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