01: /*
02: * Copyright 2005 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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,
34: FaultAwareWebServiceMessage {
35:
36: /** Returns the <code>SoapEnvelope</code> associated with this <code>SoapMessage</code>. */
37: SoapEnvelope getEnvelope() throws SoapEnvelopeException;
38:
39: /**
40: * Get the SOAP Action for this message, or <code>null</code> if not present.
41: *
42: * @return the SOAP Action.
43: */
44: String getSoapAction();
45:
46: /**
47: * Sets the SOAP Action for this message.
48: *
49: * @param soapAction the SOAP Action.
50: */
51: void setSoapAction(String soapAction);
52:
53: /**
54: * Returns the <code>SoapBody</code> associated with this <code>SoapMessage</code>. This is a convenience method for
55: * <code>getEnvelope().getBody()</code>.
56: *
57: * @see SoapEnvelope#getBody()
58: */
59: SoapBody getSoapBody() throws SoapBodyException;
60:
61: /**
62: * Returns the <code>SoapHeader</code> associated with this <code>SoapMessage</code>. This is a convenience method
63: * for <code>getEnvelope().getHeader()</code>.
64: *
65: * @see SoapEnvelope#getHeader()
66: */
67: SoapHeader getSoapHeader() throws SoapHeaderException;
68:
69: /**
70: * Returns the SOAP version of this message. This can be either SOAP 1.1 or SOAP 1.2.
71: *
72: * @return the SOAP version
73: * @see SoapVersion#SOAP_11
74: * @see SoapVersion#SOAP_12
75: */
76: SoapVersion getVersion();
77:
78: }
|