Package org.springframework.ws.transport

Examples of org.springframework.ws.transport.TransportOutputStream.addHeader()


                    String charsetEncoding = axiomMessage.getCharsetEncoding();
                    contentType += "; charset=" + charsetEncoding;
                }
                SoapVersion version = getVersion();
                if (SoapVersion.SOAP_11 == version) {
                    transportOutputStream.addHeader(TransportConstants.HEADER_SOAP_ACTION, soapAction);
                    transportOutputStream.addHeader(TransportConstants.HEADER_ACCEPT, version.getContentType());
                }
                else if (SoapVersion.SOAP_12 == version) {
                    contentType += "; action=" + soapAction;
                    transportOutputStream.addHeader(TransportConstants.HEADER_ACCEPT, version.getContentType());
View Full Code Here


                    contentType += "; charset=" + charsetEncoding;
                }
                SoapVersion version = getVersion();
                if (SoapVersion.SOAP_11 == version) {
                    transportOutputStream.addHeader(TransportConstants.HEADER_SOAP_ACTION, soapAction);
                    transportOutputStream.addHeader(TransportConstants.HEADER_ACCEPT, version.getContentType());
                }
                else if (SoapVersion.SOAP_12 == version) {
                    contentType += "; action=" + soapAction;
                    transportOutputStream.addHeader(TransportConstants.HEADER_ACCEPT, version.getContentType());
                }
View Full Code Here

                    transportOutputStream.addHeader(TransportConstants.HEADER_SOAP_ACTION, soapAction);
                    transportOutputStream.addHeader(TransportConstants.HEADER_ACCEPT, version.getContentType());
                }
                else if (SoapVersion.SOAP_12 == version) {
                    contentType += "; action=" + soapAction;
                    transportOutputStream.addHeader(TransportConstants.HEADER_ACCEPT, version.getContentType());
                }
                transportOutputStream.addHeader(TransportConstants.HEADER_CONTENT_TYPE, contentType);

            }
            if (!(outputFormat.isOptimized()) & outputFormat.isDoingSWA()) {
View Full Code Here

                }
                else if (SoapVersion.SOAP_12 == version) {
                    contentType += "; action=" + soapAction;
                    transportOutputStream.addHeader(TransportConstants.HEADER_ACCEPT, version.getContentType());
                }
                transportOutputStream.addHeader(TransportConstants.HEADER_CONTENT_TYPE, contentType);

            }
            if (!(outputFormat.isOptimized()) & outputFormat.isDoingSWA()) {
                writeSwAMessage(outputStream, outputFormat);
            }
View Full Code Here

                  }
                    message.saveChanges();
              }
              for (Iterator<?> iterator = headers.getAllHeaders(); iterator.hasNext();) {
                  MimeHeader mimeHeader = (MimeHeader) iterator.next();
                  transportOutputStream.addHeader(mimeHeader.getName(), mimeHeader.getValue());
              }
          }
          message.writeTo(outputStream);

          outputStream.flush();
View Full Code Here

        if (outputStream instanceof TransportOutputStream) {
            TransportOutputStream tos = (TransportOutputStream) outputStream;
            for (Map.Entry<String, List<String>> entry : mimeHeaders.entrySet()) {
                String name = entry.getKey();
                for (String value : entry.getValue()) {
                    tos.addHeader(name, value);
                }
            }
        }
        try {
            XMLEventWriter eventWriter = messageFactory.getOutputFactory().createXMLEventWriter(outputStream);
View Full Code Here

    @Override
    public void writeTo(OutputStream outputStream) throws IOException {
        try {
            if (outputStream instanceof TransportOutputStream) {
                TransportOutputStream transportOutputStream = (TransportOutputStream) outputStream;
                transportOutputStream.addHeader(TransportConstants.HEADER_CONTENT_TYPE, contentType);
            }
            transformer.transform(getPayloadSource(), new StreamResult(outputStream));
        }
        catch (TransformerException ex) {
            throw new DomPoxMessageException("Could write document: " + ex.getMessage(), ex);
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.