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 java.io.IOException;
20 import java.io.OutputStream;
21 import java.util.Iterator;
22 import java.util.Locale;
23 import javax.activation.DataHandler;
24 import javax.xml.namespace.QName;
25 import javax.xml.soap.AttachmentPart;
26 import javax.xml.soap.Detail;
27 import javax.xml.soap.DetailEntry;
28 import javax.xml.soap.MimeHeaders;
29 import javax.xml.soap.SOAPBody;
30 import javax.xml.soap.SOAPElement;
31 import javax.xml.soap.SOAPEnvelope;
32 import javax.xml.soap.SOAPException;
33 import javax.xml.soap.SOAPFault;
34 import javax.xml.soap.SOAPHeader;
35 import javax.xml.soap.SOAPHeaderElement;
36 import javax.xml.soap.SOAPMessage;
37 import javax.xml.transform.Result;
38 import javax.xml.transform.Source;
39
40
41
42
43
44
45
46 abstract class SaajImplementation {
47
48
49
50
51
52
53 abstract QName getName(SOAPElement element);
54
55
56 abstract Source getSource(SOAPElement element);
57
58
59 abstract Result getResult(SOAPElement element);
60
61
62 abstract String getText(SOAPElement element);
63
64
65 abstract void setText(SOAPElement element, String content) throws SOAPException;
66
67
68 abstract void addAttribute(SOAPElement element, QName name, String value) throws SOAPException;
69
70
71 abstract void removeAttribute(SOAPElement element, QName name) throws SOAPException;
72
73
74 abstract String getAttributeValue(SOAPElement element, QName name) throws SOAPException;
75
76
77 abstract Iterator<QName> getAllAttributes(SOAPElement element);
78
79
80 abstract void removeContents(SOAPElement element);
81
82
83 abstract Iterator<SOAPElement> getChildElements(SOAPElement element, QName name) throws SOAPException;
84
85
86 abstract void addNamespaceDeclaration(SOAPElement element, String prefix, String namespaceUri) throws SOAPException;
87
88
89
90
91
92
93 abstract SOAPEnvelope getEnvelope(SOAPMessage message) throws SOAPException;
94
95
96 abstract void writeTo(SOAPMessage message, OutputStream outputStream) throws SOAPException, IOException;
97
98
99 abstract MimeHeaders getMimeHeaders(SOAPMessage message);
100
101
102 abstract Iterator<AttachmentPart> getAttachments(SOAPMessage message);
103
104
105 abstract Iterator<AttachmentPart> getAttachment(SOAPMessage message, MimeHeaders mimeHeaders);
106
107
108 abstract AttachmentPart addAttachmentPart(SOAPMessage message, DataHandler dataHandler);
109
110
111
112
113
114
115 abstract SOAPHeader getHeader(SOAPEnvelope envelope) throws SOAPException;
116
117
118 abstract SOAPBody getBody(SOAPEnvelope envelope) throws SOAPException;
119
120
121
122
123
124
125 abstract SOAPHeaderElement addHeaderElement(SOAPHeader header, QName name) throws SOAPException;
126
127
128 abstract Iterator<SOAPHeaderElement> examineAllHeaderElements(SOAPHeader header);
129
130
131 abstract Iterator<SOAPHeaderElement> examineMustUnderstandHeaderElements(SOAPHeader header, String actorOrRole);
132
133
134 abstract SOAPHeaderElement addNotUnderstoodHeaderElement(SOAPHeader header, QName name) throws SOAPException;
135
136
137 abstract SOAPHeaderElement addUpgradeHeaderElement(SOAPHeader header, String[] supportedSoapUris)
138 throws SOAPException;
139
140
141
142
143
144
145 abstract String getActorOrRole(SOAPHeaderElement headerElement);
146
147
148 abstract void setActorOrRole(SOAPHeaderElement headerElement, String actorOrRole);
149
150
151 abstract boolean getMustUnderstand(SOAPHeaderElement headerElement);
152
153
154 abstract void setMustUnderstand(SOAPHeaderElement headerElement, boolean mustUnderstand);
155
156
157
158
159
160
161 abstract boolean hasFault(SOAPBody body);
162
163
164 abstract SOAPFault getFault(SOAPBody body);
165
166
167 abstract SOAPFault addFault(SOAPBody body, QName faultCode, String faultString, Locale locale) throws SOAPException;
168
169
170 abstract SOAPElement getFirstBodyElement(SOAPBody body);
171
172
173
174
175
176
177 abstract QName getFaultCode(SOAPFault fault);
178
179
180 abstract String getFaultActor(SOAPFault fault);
181
182
183 abstract void setFaultActor(SOAPFault fault, String actorOrRole) throws SOAPException;
184
185
186 abstract String getFaultString(SOAPFault fault);
187
188
189 abstract Locale getFaultStringLocale(SOAPFault fault);
190
191
192 abstract Detail getFaultDetail(SOAPFault fault);
193
194
195 abstract Detail addFaultDetail(SOAPFault fault) throws SOAPException;
196
197
198 abstract String getFaultRole(SOAPFault fault);
199
200
201 abstract void setFaultRole(SOAPFault fault, String role) throws SOAPException;
202
203
204 abstract Iterator<QName> getFaultSubcodes(SOAPFault fault);
205
206
207 abstract void appendFaultSubcode(SOAPFault fault, QName subcode) throws SOAPException;
208
209
210 abstract String getFaultNode(SOAPFault fault);
211
212
213 abstract void setFaultNode(SOAPFault fault, String uri) throws SOAPException;
214
215
216 abstract String getFaultReasonText(SOAPFault fault, Locale locale) throws SOAPException;
217
218
219 abstract void setFaultReasonText(SOAPFault fault, Locale locale, String text) throws SOAPException;
220
221
222
223
224
225
226 abstract DetailEntry addDetailEntry(Detail detail, QName name) throws SOAPException;
227
228
229 abstract Iterator<DetailEntry> getDetailEntries(Detail detail);
230
231
232
233
234
235
236 abstract void addTextNode(DetailEntry detailEntry, String text) throws SOAPException;
237 }