Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2002-2009 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.axiom;
 
 
Axiom-Specific version of org.springframework.ws.soap.SoapEnvelope.

Author(s):
Arjen Poutsma
Since:
1.0.0
 
 class AxiomSoapEnvelope extends AxiomSoapElement implements SoapEnvelope {
 
     boolean payloadCaching;
 
     private AxiomSoapBody body;
 
     private final boolean langAttributeOnSoap11FaultString;
 
     AxiomSoapEnvelope(SOAPEnvelope axiomEnvelope,
                       SOAPFactory axiomFactory,
                       boolean payloadCaching,
                       boolean langAttributeOnSoap11FaultString) {
         super(axiomEnvelopeaxiomFactory);
         this. = payloadCaching;
         this. = langAttributeOnSoap11FaultString;
     }
 
     public SoapHeader getHeader() {
         try {
             if (getAxiomEnvelope().getHeader() == null) {
                 return null;
             }
             else {
                 SOAPHeader axiomHeader = getAxiomEnvelope().getHeader();
                 String namespaceURI = getAxiomEnvelope().getNamespace().getNamespaceURI();
                 if (..equals(namespaceURI)) {
                     return new AxiomSoap11Header(axiomHeadergetAxiomFactory());
                 }
                 else if (..equals(namespaceURI)) {
                     return new AxiomSoap12Header(axiomHeadergetAxiomFactory());
                 }
                 else {
                     throw new AxiomSoapEnvelopeException("Unknown SOAP namespace \"" + namespaceURI + "\"");
                 }
             }
         }
         catch (OMException ex) {
             throw new AxiomSoapHeaderException(ex);
         }
     }
 
     public SoapBody getBody() {
         if ( == null) {
             try {
                 SOAPBody axiomBody = getAxiomEnvelope().getBody();
                 String namespaceURI = getAxiomEnvelope().getNamespace().getNamespaceURI();
                 if (..equals(namespaceURI)) {
                      = new AxiomSoap11Body(axiomBodygetAxiomFactory(), ,
                             );
                 }
                 else if (..equals(namespaceURI)) {
                      = new AxiomSoap12Body(axiomBodygetAxiomFactory(), );
                 }
                 else {
                     throw new AxiomSoapEnvelopeException("Unknown SOAP namespace \"" + namespaceURI + "\"");
                 }
             }
             catch (OMException ex) {
                 throw new AxiomSoapBodyException(ex);
             }
         }
         return ;
     }
    protected SOAPEnvelope getAxiomEnvelope() {
        return (SOAPEnvelopegetAxiomElement();
    }
New to GrepCode? Check out our FAQ X