Package org.springframework.ws.soap

Examples of org.springframework.ws.soap.SoapVersion


                String contentType = outputFormat.getContentType();
                if (!(outputFormat.isDoingSWA() || outputFormat.isOptimized())) {
                    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());
                }
                transportOutputStream.addHeader(TransportConstants.HEADER_CONTENT_TYPE, contentType);

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


        XMLEvent event = eventReader.nextTag();
        if (!event.isStartElement()) {
            throw new StroapMessageCreationException("Unexpected event: " + event + ", expected StartElement");
        }
        StartElement startElement = event.asStartElement();
        SoapVersion soapVersion = messageFactory.getSoapVersion();
        if (!soapVersion.getEnvelopeName().equals(startElement.getName())) {
            throw new StroapMessageCreationException(
                    "Unexpected name: " + startElement.getName() + ", expected " + soapVersion.getEnvelopeName());
        }
        StroapHeader header = null;
        StroapBody body = null;
        XMLEvent peekedEvent = eventReader.peek();
        while (peekedEvent != null) {
            if (peekedEvent.isStartElement()) {
                QName headerOrBodyName = peekedEvent.asStartElement().getName();
                if (soapVersion.getHeaderName().equals(headerOrBodyName)) {
                    header = StroapHeader.build(eventReader, messageFactory);
                }
                else if (soapVersion.getBodyName().equals(headerOrBodyName)) {
                    body = StroapBody.build(eventReader, messageFactory);
                    break;
                }
                else {
                    throw new StroapMessageCreationException(
View Full Code Here

        XMLEvent event = eventReader.nextTag();
        if (!event.isStartElement()) {
            throw new StroapMessageCreationException("Unexpected event: " + event + ", expected StartElement");
        }
        StartElement startElement = event.asStartElement();
        SoapVersion soapVersion = messageFactory.getSoapVersion();
        if (!soapVersion.getHeaderName().equals(startElement.getName())) {
            throw new StroapMessageCreationException(
                    "Unexpected name: " + startElement.getName() + ", expected " + soapVersion.getHeaderName());
        }

        if (SoapVersion.SOAP_11.equals(soapVersion)) {
            return new Stroap11Header(startElement, messageFactory);
        }
View Full Code Here

        XMLEvent event = eventReader.nextTag();
        if (!event.isStartElement()) {
            throw new StroapMessageCreationException("Unexpected event: " + event + ", expected StartElement");
        }
        StartElement startElement = event.asStartElement();
        SoapVersion soapVersion = messageFactory.getSoapVersion();
        if (!soapVersion.getBodyName().equals(startElement.getName())) {
            throw new StroapMessageCreationException(
                    "Unexpected name: " + startElement.getName() + ", expected " + soapVersion.getBodyName());
        }
        StroapPayload payload;
        if (messageFactory.isPayloadCaching()) {
            payload = new CachingStroapPayload(eventReader);
        }
View Full Code Here

TOP

Related Classes of org.springframework.ws.soap.SoapVersion

Copyright © 2018 www.massapicom. 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.