Package org.apache.axis2.transport.http

Examples of org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo()


                    //Sandesha2Constants.MessageContextProperties.SEQUENCE_ID
                    "WSRMSequenceId") == null) {
                // see comment above on the reasoning
                out.write(new byte[0]);
            } else {
                messageFormatter.writeTo(msgContext, format, out, true);
            }
            out.close();
        } catch (IOException e) {
            handleException("IO Error sending response message", e);
        }
View Full Code Here


                throw new AxisFault(Constants.OUT_TRANSPORT_INFO + " has not been set");
            }
        }

        try {
            messageFormatter.writeTo(msgContext, format, out, true);
            out.close();
        } catch (IOException e) {
            handleException("IO Error sending response message", e);
        }
    }
View Full Code Here

            MessageFormatter messageFormatter = TransportUtils
                    .getMessageFormatter(msgContext);
            format.setDoOptimize(msgContext.isDoingMTOM());
            //Set to null so that the code will not fail on 7bit.
            format.setCharSetEncoding(null);
            messageFormatter.writeTo(msgContext, format, out, false);
            out.flush();
        } catch (Exception e) {
            throw new AxisFault(e.getMessage(),e);
        }
    }
View Full Code Here

                    out.flush();
                } catch (IOException e) {
                    throw new AxisFault("Could not compress response");
                }
            } else {
                messageFormatter.writeTo(msgContext, format, out, false);
            }
        } catch (AxisFault axisFault) {
            log.error(axisFault.getMessage(), axisFault);
            throw axisFault;
        }
View Full Code Here

                msgContext.getProperty(
                    Sandesha2Constants.MessageContextProperties.SEQUENCE_ID) == null) {
                // see comment above on the reasoning
                out.write(new byte[0]);
            } else {
                messageFormatter.writeTo(msgContext, format, out, true);
            }
            out.close();
        } catch (IOException e) {
            handleException("IO Error sending response message", e);
        }
View Full Code Here

                throw new AxisFault(Constants.OUT_TRANSPORT_INFO + " has not been set");
            }
        }

        try {
            messageFormatter.writeTo(msgContext, format, out, true);
            out.close();
        } catch (IOException e) {
            handleException("IO Error sending response message", e);
        }
    }
View Full Code Here

                    dataHandler = new DataHandler(firstChild.getText(), MailConstants.TEXT_PLAIN);
                }
            } else {

                baos = new ByteArrayOutputStream();
                messageFormatter.writeTo(msgContext, format, baos, true);

                // create the data handler
                dataHandler = new DataHandler(
                    new String(baos.toByteArray(), format.getCharSetEncoding()), contentType);
View Full Code Here

        }

        try {
            OutputStream os = responseFile.getContent().getOutputStream();
            try {
              messageFormatter.writeTo(msgContext, format, os, true);
            } finally {
              os.close();
            }
        } catch (FileSystemException e) {
            handleException("IO Error while creating response file : " + responseFile.getName(), e);
View Full Code Here

            String contentType = messageFormatter.getContentType(
                msgContext, format, msgContext.getSoapAction());

            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            try {
                messageFormatter.writeTo(msgContext, format, baos, true);
                baos.flush();
            } catch (IOException e) {
                handleException("IO Error while creating BytesMessage", e);
            }
View Full Code Here

                    //Sandesha2Constants.MessageContextProperties.SEQUENCE_ID
                    "WSRMSequenceId") == null) {
                // see comment above on the reasoning
                out.write(new byte[0]);
            } else {
                messageFormatter.writeTo(msgContext, format, out, true);
            }
            out.close();
        } catch (IOException e) {
            handleException("IO Error sending response message", e);
        }
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.