1 /* 2 * Copyright 2005 the original author or authors. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package org.springframework.ws.soap; 18 19 import org.springframework.ws.FaultAwareWebServiceMessage; 20 import org.springframework.ws.mime.MimeMessage; 21 22 /** 23 * Represents an abstraction for SOAP messages, providing access to a SOAP Envelope. The contents of the SOAP body can 24 * be retrieved by <code>getPayloadSource()</code> and <code>getPayloadResult()</code> on 25 * <code>WebServiceMessage</code>, the super-interface of this interface. 26 * 27 * @author Arjen Poutsma 28 * @see #getPayloadSource() 29 * @see #getPayloadResult() 30 * @see #getEnvelope() 31 * @since 1.0.0 32 */ 33 public interface SoapMessage extends MimeMessage, FaultAwareWebServiceMessage { 34 35 /** Returns the <code>SoapEnvelope</code> associated with this <code>SoapMessage</code>. */ 36 SoapEnvelope getEnvelope() throws SoapEnvelopeException; 37 38 /** 39 * Get the SOAP Action for this message, or <code>null</code> if not present. 40 * 41 * @return the SOAP Action. 42 */ 43 String getSoapAction(); 44 45 /** 46 * Sets the SOAP Action for this message. 47 * 48 * @param soapAction the SOAP Action. 49 */ 50 void setSoapAction(String soapAction); 51 52 /** 53 * Returns the <code>SoapBody</code> associated with this <code>SoapMessage</code>. This is a convenience method for 54 * <code>getEnvelope().getBody()</code>. 55 * 56 * @see SoapEnvelope#getBody() 57 */ 58 SoapBody getSoapBody() throws SoapBodyException; 59 60 /** 61 * Returns the <code>SoapHeader</code> associated with this <code>SoapMessage</code>. This is a convenience method 62 * for <code>getEnvelope().getHeader()</code>. 63 * 64 * @see SoapEnvelope#getHeader() 65 */ 66 SoapHeader getSoapHeader() throws SoapHeaderException; 67 68 /** 69 * Returns the SOAP version of this message. This can be either SOAP 1.1 or SOAP 1.2. 70 * 71 * @return the SOAP version 72 * @see SoapVersion#SOAP_11 73 * @see SoapVersion#SOAP_12 74 */ 75 SoapVersion getVersion(); 76 77 }