1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.springframework.ws.soap.saaj;
18
19 import javax.xml.soap.SOAPBody;
20 import javax.xml.soap.SOAPElement;
21 import javax.xml.transform.Result;
22 import javax.xml.transform.Source;
23
24 import org.springframework.ws.soap.SoapBody;
25
26
27
28
29
30
31
32 abstract class SaajSoapBody extends SaajSoapElement implements SoapBody {
33
34 public SaajSoapBody(SOAPBody body) {
35 super(body);
36 }
37
38 public Source getPayloadSource() {
39 SOAPElement bodyElement = getImplementation().getFirstBodyElement(getSaajBody());
40 return bodyElement == null ? null : getImplementation().getSource(bodyElement);
41 }
42
43 public Result getPayloadResult() {
44 getImplementation().removeContents(getSaajBody());
45 return getImplementation().getResult(getSaajBody());
46 }
47
48 public boolean hasFault() {
49 return getImplementation().hasFault(getSaajBody());
50 }
51
52 protected SOAPBody getSaajBody() {
53 return (SOAPBody) getSaajElement();
54 }
55
56 }