|
1 /* |
|
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 * |
|
5 * This code is free software; you can redistribute it and/or modify it |
|
6 * under the terms of the GNU General Public License version 2 only, as |
|
7 * published by the Free Software Foundation. Oracle designates this |
|
8 * particular file as subject to the "Classpath" exception as provided |
|
9 * by Oracle in the LICENSE file that accompanied this code. |
|
10 * |
|
11 * This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 * version 2 for more details (a copy is included in the LICENSE file that |
|
15 * accompanied this code). |
|
16 * |
|
17 * You should have received a copy of the GNU General Public License version |
|
18 * 2 along with this work; if not, write to the Free Software Foundation, |
|
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 * |
|
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 * or visit www.oracle.com if you need additional information or have any |
|
23 * questions. |
|
24 */ |
|
25 |
|
26 package com.sun.xml.internal.ws.resources; |
|
27 |
|
28 import com.sun.istack.internal.localization.Localizable; |
|
29 import com.sun.istack.internal.localization.LocalizableMessageFactory; |
|
30 import com.sun.istack.internal.localization.Localizer; |
|
31 |
|
32 |
|
33 /** |
|
34 * Defines string formatting method for each constant in the resource file |
|
35 * |
|
36 */ |
|
37 public final class AddressingMessages { |
|
38 |
|
39 private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.addressing"); |
|
40 private final static Localizer localizer = new Localizer(); |
|
41 |
|
42 public static Localizable localizableNON_ANONYMOUS_RESPONSE_ONEWAY() { |
|
43 return messageFactory.getMessage("nonAnonymous.response.oneway"); |
|
44 } |
|
45 |
|
46 /** |
|
47 * Ignoring non-anonymous response for one-way message |
|
48 * |
|
49 */ |
|
50 public static String NON_ANONYMOUS_RESPONSE_ONEWAY() { |
|
51 return localizer.localize(localizableNON_ANONYMOUS_RESPONSE_ONEWAY()); |
|
52 } |
|
53 |
|
54 public static Localizable localizableNULL_WSA_HEADERS() { |
|
55 return messageFactory.getMessage("null.wsa.headers"); |
|
56 } |
|
57 |
|
58 /** |
|
59 * No WS-Addressing headers found processing the server inbound request |
|
60 * |
|
61 */ |
|
62 public static String NULL_WSA_HEADERS() { |
|
63 return localizer.localize(localizableNULL_WSA_HEADERS()); |
|
64 } |
|
65 |
|
66 public static Localizable localizableUNKNOWN_WSA_HEADER() { |
|
67 return messageFactory.getMessage("unknown.wsa.header"); |
|
68 } |
|
69 |
|
70 /** |
|
71 * Unknown WS-Addressing header |
|
72 * |
|
73 */ |
|
74 public static String UNKNOWN_WSA_HEADER() { |
|
75 return localizer.localize(localizableUNKNOWN_WSA_HEADER()); |
|
76 } |
|
77 |
|
78 public static Localizable localizableNULL_ACTION() { |
|
79 return messageFactory.getMessage("null.action"); |
|
80 } |
|
81 |
|
82 /** |
|
83 * Populating request Addressing headers and found null Action |
|
84 * |
|
85 */ |
|
86 public static String NULL_ACTION() { |
|
87 return localizer.localize(localizableNULL_ACTION()); |
|
88 } |
|
89 |
|
90 public static Localizable localizableINVALID_WSAW_ANONYMOUS(Object arg0) { |
|
91 return messageFactory.getMessage("invalid.wsaw.anonymous", arg0); |
|
92 } |
|
93 |
|
94 /** |
|
95 * Invalid value obtained from wsaw:Anonymous: "{0}" |
|
96 * |
|
97 */ |
|
98 public static String INVALID_WSAW_ANONYMOUS(Object arg0) { |
|
99 return localizer.localize(localizableINVALID_WSAW_ANONYMOUS(arg0)); |
|
100 } |
|
101 |
|
102 public static Localizable localizableNULL_SOAP_VERSION() { |
|
103 return messageFactory.getMessage("null.soap.version"); |
|
104 } |
|
105 |
|
106 /** |
|
107 * Unexpected null SOAP version |
|
108 * |
|
109 */ |
|
110 public static String NULL_SOAP_VERSION() { |
|
111 return localizer.localize(localizableNULL_SOAP_VERSION()); |
|
112 } |
|
113 |
|
114 public static Localizable localizableWSDL_BOUND_OPERATION_NOT_FOUND(Object arg0) { |
|
115 return messageFactory.getMessage("wsdlBoundOperation.notFound", arg0); |
|
116 } |
|
117 |
|
118 /** |
|
119 * Cannot find an operation in wsdl:binding for "{0}" |
|
120 * |
|
121 */ |
|
122 public static String WSDL_BOUND_OPERATION_NOT_FOUND(Object arg0) { |
|
123 return localizer.localize(localizableWSDL_BOUND_OPERATION_NOT_FOUND(arg0)); |
|
124 } |
|
125 |
|
126 public static Localizable localizableNON_UNIQUE_OPERATION_SIGNATURE(Object arg0, Object arg1, Object arg2, Object arg3) { |
|
127 return messageFactory.getMessage("non.unique.operation.signature", arg0, arg1, arg2, arg3); |
|
128 } |
|
129 |
|
130 /** |
|
131 * Operations in a port should have unique operation signature to successfuly identify a associated wsdl operation for a message. WSDL operation {0} and {1} have the same operation signature, wsa:Action "{2}" and request body block "{3}", Method dispatching may fail at runtime. Use unique wsa:Action for each operation |
|
132 * |
|
133 */ |
|
134 public static String NON_UNIQUE_OPERATION_SIGNATURE(Object arg0, Object arg1, Object arg2, Object arg3) { |
|
135 return localizer.localize(localizableNON_UNIQUE_OPERATION_SIGNATURE(arg0, arg1, arg2, arg3)); |
|
136 } |
|
137 |
|
138 public static Localizable localizableNON_ANONYMOUS_RESPONSE() { |
|
139 return messageFactory.getMessage("nonAnonymous.response"); |
|
140 } |
|
141 |
|
142 /** |
|
143 * Sending 202 and processing non-anonymous response |
|
144 * |
|
145 */ |
|
146 public static String NON_ANONYMOUS_RESPONSE() { |
|
147 return localizer.localize(localizableNON_ANONYMOUS_RESPONSE()); |
|
148 } |
|
149 |
|
150 public static Localizable localizableVALIDATION_SERVER_NULL_ACTION() { |
|
151 return messageFactory.getMessage("validation.server.nullAction"); |
|
152 } |
|
153 |
|
154 /** |
|
155 * Validating inbound Addressing headers on server and found null Action |
|
156 * |
|
157 */ |
|
158 public static String VALIDATION_SERVER_NULL_ACTION() { |
|
159 return localizer.localize(localizableVALIDATION_SERVER_NULL_ACTION()); |
|
160 } |
|
161 |
|
162 public static Localizable localizableFAULT_TO_CANNOT_PARSE() { |
|
163 return messageFactory.getMessage("faultTo.cannot.parse"); |
|
164 } |
|
165 |
|
166 /** |
|
167 * FaultTo header cannot be parsed |
|
168 * |
|
169 */ |
|
170 public static String FAULT_TO_CANNOT_PARSE() { |
|
171 return localizer.localize(localizableFAULT_TO_CANNOT_PARSE()); |
|
172 } |
|
173 |
|
174 public static Localizable localizableVALIDATION_CLIENT_NULL_ACTION() { |
|
175 return messageFactory.getMessage("validation.client.nullAction"); |
|
176 } |
|
177 |
|
178 /** |
|
179 * Validating inbound Addressing headers on client and found null Action |
|
180 * |
|
181 */ |
|
182 public static String VALIDATION_CLIENT_NULL_ACTION() { |
|
183 return localizer.localize(localizableVALIDATION_CLIENT_NULL_ACTION()); |
|
184 } |
|
185 |
|
186 public static Localizable localizableNULL_MESSAGE() { |
|
187 return messageFactory.getMessage("null.message"); |
|
188 } |
|
189 |
|
190 /** |
|
191 * Null message found when processing the server inbound request and WS-Addressing is required |
|
192 * |
|
193 */ |
|
194 public static String NULL_MESSAGE() { |
|
195 return localizer.localize(localizableNULL_MESSAGE()); |
|
196 } |
|
197 |
|
198 public static Localizable localizableACTION_NOT_SUPPORTED_EXCEPTION(Object arg0) { |
|
199 return messageFactory.getMessage("action.not.supported.exception", arg0); |
|
200 } |
|
201 |
|
202 /** |
|
203 * Action: "{0}" not supported |
|
204 * |
|
205 */ |
|
206 public static String ACTION_NOT_SUPPORTED_EXCEPTION(Object arg0) { |
|
207 return localizer.localize(localizableACTION_NOT_SUPPORTED_EXCEPTION(arg0)); |
|
208 } |
|
209 |
|
210 public static Localizable localizableNON_ANONYMOUS_RESPONSE_NULL_HEADERS(Object arg0) { |
|
211 return messageFactory.getMessage("nonAnonymous.response.nullHeaders", arg0); |
|
212 } |
|
213 |
|
214 /** |
|
215 * No response headers found in non-anonymous response from "{0}" |
|
216 * |
|
217 */ |
|
218 public static String NON_ANONYMOUS_RESPONSE_NULL_HEADERS(Object arg0) { |
|
219 return localizer.localize(localizableNON_ANONYMOUS_RESPONSE_NULL_HEADERS(arg0)); |
|
220 } |
|
221 |
|
222 public static Localizable localizableNON_ANONYMOUS_RESPONSE_SENDING(Object arg0) { |
|
223 return messageFactory.getMessage("nonAnonymous.response.sending", arg0); |
|
224 } |
|
225 |
|
226 /** |
|
227 * Sending non-anonymous reply to "{0}" |
|
228 * |
|
229 */ |
|
230 public static String NON_ANONYMOUS_RESPONSE_SENDING(Object arg0) { |
|
231 return localizer.localize(localizableNON_ANONYMOUS_RESPONSE_SENDING(arg0)); |
|
232 } |
|
233 |
|
234 public static Localizable localizableREPLY_TO_CANNOT_PARSE() { |
|
235 return messageFactory.getMessage("replyTo.cannot.parse"); |
|
236 } |
|
237 |
|
238 /** |
|
239 * ReplyTo header cannot be parsed |
|
240 * |
|
241 */ |
|
242 public static String REPLY_TO_CANNOT_PARSE() { |
|
243 return localizer.localize(localizableREPLY_TO_CANNOT_PARSE()); |
|
244 } |
|
245 |
|
246 public static Localizable localizableINVALID_ADDRESSING_HEADER_EXCEPTION(Object arg0, Object arg1) { |
|
247 return messageFactory.getMessage("invalid.addressing.header.exception", arg0, arg1); |
|
248 } |
|
249 |
|
250 /** |
|
251 * Invalid WS-Addressing header: "{0}",Reason: "{1}" |
|
252 * |
|
253 */ |
|
254 public static String INVALID_ADDRESSING_HEADER_EXCEPTION(Object arg0, Object arg1) { |
|
255 return localizer.localize(localizableINVALID_ADDRESSING_HEADER_EXCEPTION(arg0, arg1)); |
|
256 } |
|
257 |
|
258 public static Localizable localizableWSAW_ANONYMOUS_PROHIBITED() { |
|
259 return messageFactory.getMessage("wsaw.anonymousProhibited"); |
|
260 } |
|
261 |
|
262 /** |
|
263 * Operation has "prohibited" value for wsaw:anonymous in the WSDL, Addressing must be disabled and SOAP message need to be hand-crafted |
|
264 * |
|
265 */ |
|
266 public static String WSAW_ANONYMOUS_PROHIBITED() { |
|
267 return localizer.localize(localizableWSAW_ANONYMOUS_PROHIBITED()); |
|
268 } |
|
269 |
|
270 public static Localizable localizableNULL_WSDL_PORT() { |
|
271 return messageFactory.getMessage("null.wsdlPort"); |
|
272 } |
|
273 |
|
274 /** |
|
275 * Populating request Addressing headers and found null WSDLPort |
|
276 * |
|
277 */ |
|
278 public static String NULL_WSDL_PORT() { |
|
279 return localizer.localize(localizableNULL_WSDL_PORT()); |
|
280 } |
|
281 |
|
282 public static Localizable localizableADDRESSING_SHOULD_BE_ENABLED() { |
|
283 return messageFactory.getMessage("addressing.should.be.enabled."); |
|
284 } |
|
285 |
|
286 /** |
|
287 * Addressing is not enabled |
|
288 * |
|
289 */ |
|
290 public static String ADDRESSING_SHOULD_BE_ENABLED() { |
|
291 return localizer.localize(localizableADDRESSING_SHOULD_BE_ENABLED()); |
|
292 } |
|
293 |
|
294 public static Localizable localizableNULL_ADDRESSING_VERSION() { |
|
295 return messageFactory.getMessage("null.addressing.version"); |
|
296 } |
|
297 |
|
298 /** |
|
299 * Unexpected null Addressing version |
|
300 * |
|
301 */ |
|
302 public static String NULL_ADDRESSING_VERSION() { |
|
303 return localizer.localize(localizableNULL_ADDRESSING_VERSION()); |
|
304 } |
|
305 |
|
306 public static Localizable localizableMISSING_HEADER_EXCEPTION(Object arg0) { |
|
307 return messageFactory.getMessage("missing.header.exception", arg0); |
|
308 } |
|
309 |
|
310 /** |
|
311 * Missing WS-Addressing header: "{0}" |
|
312 * |
|
313 */ |
|
314 public static String MISSING_HEADER_EXCEPTION(Object arg0) { |
|
315 return localizer.localize(localizableMISSING_HEADER_EXCEPTION(arg0)); |
|
316 } |
|
317 |
|
318 public static Localizable localizableNULL_PACKET() { |
|
319 return messageFactory.getMessage("null.packet"); |
|
320 } |
|
321 |
|
322 /** |
|
323 * Populating request Addressing headers and found null Packet |
|
324 * |
|
325 */ |
|
326 public static String NULL_PACKET() { |
|
327 return localizer.localize(localizableNULL_PACKET()); |
|
328 } |
|
329 |
|
330 public static Localizable localizableWRONG_ADDRESSING_VERSION(Object arg0, Object arg1) { |
|
331 return messageFactory.getMessage("wrong.addressing.version", arg0, arg1); |
|
332 } |
|
333 |
|
334 /** |
|
335 * Expected "{0}" version of WS-Addressing but found "{1}" |
|
336 * |
|
337 */ |
|
338 public static String WRONG_ADDRESSING_VERSION(Object arg0, Object arg1) { |
|
339 return localizer.localize(localizableWRONG_ADDRESSING_VERSION(arg0, arg1)); |
|
340 } |
|
341 |
|
342 public static Localizable localizableADDRESSING_NOT_ENABLED(Object arg0) { |
|
343 return messageFactory.getMessage("addressing.notEnabled", arg0); |
|
344 } |
|
345 |
|
346 /** |
|
347 * Addressing is not enabled, {0} should not be included in the pipeline" |
|
348 * |
|
349 */ |
|
350 public static String ADDRESSING_NOT_ENABLED(Object arg0) { |
|
351 return localizer.localize(localizableADDRESSING_NOT_ENABLED(arg0)); |
|
352 } |
|
353 |
|
354 public static Localizable localizableNON_ANONYMOUS_UNKNOWN_PROTOCOL(Object arg0) { |
|
355 return messageFactory.getMessage("nonAnonymous.unknown.protocol", arg0); |
|
356 } |
|
357 |
|
358 /** |
|
359 * Unknown protocol: "{0}" |
|
360 * |
|
361 */ |
|
362 public static String NON_ANONYMOUS_UNKNOWN_PROTOCOL(Object arg0) { |
|
363 return localizer.localize(localizableNON_ANONYMOUS_UNKNOWN_PROTOCOL(arg0)); |
|
364 } |
|
365 |
|
366 public static Localizable localizableNULL_HEADERS() { |
|
367 return messageFactory.getMessage("null.headers"); |
|
368 } |
|
369 |
|
370 /** |
|
371 * No headers found when processing the server inbound request and WS-Addressing is required |
|
372 * |
|
373 */ |
|
374 public static String NULL_HEADERS() { |
|
375 return localizer.localize(localizableNULL_HEADERS()); |
|
376 } |
|
377 |
|
378 public static Localizable localizableNULL_BINDING() { |
|
379 return messageFactory.getMessage("null.binding"); |
|
380 } |
|
381 |
|
382 /** |
|
383 * Populating request Addressing headers and found null Binding |
|
384 * |
|
385 */ |
|
386 public static String NULL_BINDING() { |
|
387 return localizer.localize(localizableNULL_BINDING()); |
|
388 } |
|
389 |
|
390 } |