Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2005-2010 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springframework.ws.soap.saaj;
SAAJ-specific implementation of the SoapEnvelope interface. Wraps a javax.xml.soap.SOAPEnvelope.

Author(s):
Arjen Poutsma
Since:
1.0.0
    private SaajSoapBody body;
    private SaajSoapHeader header;
    private final boolean langAttributeOnSoap11FaultString;
    SaajSoapEnvelope(SOAPEnvelope elementboolean langAttributeOnSoap11FaultString) {
        super(element);
        this. = langAttributeOnSoap11FaultString;
    }
    public SoapBody getBody() {
        if ( == null) {
            try {
                SOAPBody saajBody = getImplementation().getBody(getSaajEnvelope());
                if (getImplementation().getName(saajBody).getNamespaceURI()
                        .equals(..getEnvelopeNamespaceUri())) {
                     = new SaajSoap11Body(saajBody);
                }
                else {
                     = new SaajSoap12Body(saajBody);
                }
            }
            catch (SOAPException ex) {
                throw new SaajSoapBodyException(ex);
            }
        }
        return ;
    }
    public SoapHeader getHeader() {
        if ( == null) {
            try {
                SOAPHeader saajHeader = getImplementation().getHeader(getSaajEnvelope());
                if (saajHeader != null) {
                    if (getImplementation().getName(saajHeader).getNamespaceURI()
                            .equals(..getEnvelopeNamespaceUri())) {
                         = new SaajSoap11Header(saajHeader);
                    }
                    else {
                         = new SaajSoap12Header(saajHeader);
                    }
                }
                else {
                     = null;
                }
            }
            catch (SOAPException ex) {
                throw new SaajSoapHeaderException(ex);
            }
        }
        return ;
    }
    protected SOAPEnvelope getSaajEnvelope() {
        return getSaajElement();
    }
New to GrepCode? Check out our FAQ X