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.namespace.QName;
20 import javax.xml.soap.Detail;
21 import javax.xml.soap.SOAPException;
22 import javax.xml.soap.SOAPFault;
23
24 import org.springframework.ws.soap.SoapFault;
25 import org.springframework.ws.soap.SoapFaultDetail;
26
27
28
29
30
31
32
33 abstract class SaajSoapFault extends SaajSoapElement<SOAPFault> implements SoapFault {
34
35 protected SaajSoapFault(SOAPFault fault) {
36 super(fault);
37 }
38
39 public QName getFaultCode() {
40 return getImplementation().getFaultCode(getSaajFault());
41 }
42
43 protected SOAPFault getSaajFault() {
44 return getSaajElement();
45 }
46
47 public SoapFaultDetail getFaultDetail() {
48 Detail saajDetail = getImplementation().getFaultDetail(getSaajFault());
49 return saajDetail == null ? null : new SaajSoapFaultDetail(saajDetail);
50 }
51
52 public SoapFaultDetail addFaultDetail() {
53 try {
54 Detail saajDetail = getImplementation().addFaultDetail(getSaajFault());
55 return new SaajSoapFaultDetail(saajDetail);
56 }
57 catch (SOAPException ex) {
58 throw new SaajSoapFaultException(ex);
59 }
60 }
61 }