001: package com.sun.xml.ws.resources;
002:
003: import com.sun.xml.ws.util.localization.Localizable;
004: import com.sun.xml.ws.util.localization.LocalizableMessageFactory;
005: import com.sun.xml.ws.util.localization.Localizer;
006:
007: /**
008: * Defines string formatting method for each constant in the resource file
009: *
010: */
011: public final class ClientMessages {
012:
013: private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory(
014: "com.sun.xml.ws.resources.client");
015: private final static Localizer localizer = new Localizer();
016:
017: public static Localizable localizableFAILED_TO_PARSE(Object arg0,
018: Object arg1) {
019: return messageFactory.getMessage("failed.to.parse", arg0, arg1);
020: }
021:
022: /**
023: * Failed to access the WSDL at: {0}. It failed with:
024: * {1}.
025: *
026: */
027: public static String FAILED_TO_PARSE(Object arg0, Object arg1) {
028: return localizer
029: .localize(localizableFAILED_TO_PARSE(arg0, arg1));
030: }
031:
032: public static Localizable localizableINVALID_BINDING_ID(
033: Object arg0, Object arg1) {
034: return messageFactory.getMessage("invalid.binding.id", arg0,
035: arg1);
036: }
037:
038: /**
039: * Invalid binding id: {0}. Must be: {1}
040: *
041: */
042: public static String INVALID_BINDING_ID(Object arg0, Object arg1) {
043: return localizer.localize(localizableINVALID_BINDING_ID(arg0,
044: arg1));
045: }
046:
047: public static Localizable localizableEPR_WITHOUT_ADDRESSING_ON() {
048: return messageFactory.getMessage("epr.without.addressing.on");
049: }
050:
051: /**
052: * EPR is specified without enabling WS-Addressing support.
053: *
054: */
055: public static String EPR_WITHOUT_ADDRESSING_ON() {
056: return localizer
057: .localize(localizableEPR_WITHOUT_ADDRESSING_ON());
058: }
059:
060: public static Localizable localizableINVALID_SERVICE_NO_WSDL(
061: Object arg0) {
062: return messageFactory.getMessage("invalid.service.no.wsdl",
063: arg0);
064: }
065:
066: /**
067: * No wsdl metadata for service: {0}, can't create proxy! Try creating Service by providing a WSDL URL
068: *
069: */
070: public static String INVALID_SERVICE_NO_WSDL(Object arg0) {
071: return localizer
072: .localize(localizableINVALID_SERVICE_NO_WSDL(arg0));
073: }
074:
075: public static Localizable localizableINVALID_SOAP_ROLE_NONE() {
076: return messageFactory.getMessage("invalid.soap.role.none");
077: }
078:
079: /**
080: * Cannot set SOAP 1.2 role "none"
081: *
082: */
083: public static String INVALID_SOAP_ROLE_NONE() {
084: return localizer.localize(localizableINVALID_SOAP_ROLE_NONE());
085: }
086:
087: public static Localizable localizableUNDEFINED_BINDING(Object arg0) {
088: return messageFactory.getMessage("undefined.binding", arg0);
089: }
090:
091: /**
092: * Undefined binding: {0}
093: *
094: */
095: public static String UNDEFINED_BINDING(Object arg0) {
096: return localizer.localize(localizableUNDEFINED_BINDING(arg0));
097: }
098:
099: public static Localizable localizableHTTP_NOT_FOUND(Object arg0) {
100: return messageFactory.getMessage("http.not.found", arg0);
101: }
102:
103: /**
104: * HTTP Status-Code 404: Not Found - {0}
105: *
106: */
107: public static String HTTP_NOT_FOUND(Object arg0) {
108: return localizer.localize(localizableHTTP_NOT_FOUND(arg0));
109: }
110:
111: public static Localizable localizableHTTP_CLIENT_CANNOT_CONNECT(
112: Object arg0) {
113: return messageFactory.getMessage("http.client.cannot.connect",
114: arg0);
115: }
116:
117: /**
118: * cannot connect to server: {0}
119: *
120: */
121: public static String HTTP_CLIENT_CANNOT_CONNECT(Object arg0) {
122: return localizer
123: .localize(localizableHTTP_CLIENT_CANNOT_CONNECT(arg0));
124: }
125:
126: public static Localizable localizableINVALID_EPR_PORT_NAME(
127: Object arg0, Object arg1) {
128: return messageFactory.getMessage("invalid.epr.port.name", arg0,
129: arg1);
130: }
131:
132: /**
133: * Endpoint Name specified in EPR {0} is not a WSDL port QName, valid Ports are {1}
134: *
135: */
136: public static String INVALID_EPR_PORT_NAME(Object arg0, Object arg1) {
137: return localizer.localize(localizableINVALID_EPR_PORT_NAME(
138: arg0, arg1));
139: }
140:
141: public static Localizable localizableFAILED_TO_PARSE_WITH_MEX(
142: Object arg0, Object arg1, Object arg2) {
143: return messageFactory.getMessage("failed.to.parseWithMEX",
144: arg0, arg1, arg2);
145: }
146:
147: /**
148: * Failed to access the WSDL at: {0}. It failed with:
149: * {1}.
150: * Retrying with MEX gave:
151: * {2}
152: *
153: */
154: public static String FAILED_TO_PARSE_WITH_MEX(Object arg0,
155: Object arg1, Object arg2) {
156: return localizer.localize(localizableFAILED_TO_PARSE_WITH_MEX(
157: arg0, arg1, arg2));
158: }
159:
160: public static Localizable localizableHTTP_STATUS_CODE(Object arg0,
161: Object arg1) {
162: return messageFactory
163: .getMessage("http.status.code", arg0, arg1);
164: }
165:
166: /**
167: * The server sent HTTP status code {0}: {1}
168: *
169: */
170: public static String HTTP_STATUS_CODE(Object arg0, Object arg1) {
171: return localizer.localize(localizableHTTP_STATUS_CODE(arg0,
172: arg1));
173: }
174:
175: public static Localizable localizableINVALID_ADDRESS(Object arg0) {
176: return messageFactory.getMessage("invalid.address", arg0);
177: }
178:
179: /**
180: * Invalid address: {0}
181: *
182: */
183: public static String INVALID_ADDRESS(Object arg0) {
184: return localizer.localize(localizableINVALID_ADDRESS(arg0));
185: }
186:
187: public static Localizable localizableUNDEFINED_PORT_TYPE(Object arg0) {
188: return messageFactory.getMessage("undefined.portType", arg0);
189: }
190:
191: /**
192: * Undefined port type: {0}
193: *
194: */
195: public static String UNDEFINED_PORT_TYPE(Object arg0) {
196: return localizer.localize(localizableUNDEFINED_PORT_TYPE(arg0));
197: }
198:
199: public static Localizable localizableWSDL_CONTAINS_NO_SERVICE(
200: Object arg0) {
201: return messageFactory.getMessage("wsdl.contains.no.service",
202: arg0);
203: }
204:
205: /**
206: * WSDL {0} contains no service definition.
207: *
208: */
209: public static String WSDL_CONTAINS_NO_SERVICE(Object arg0) {
210: return localizer
211: .localize(localizableWSDL_CONTAINS_NO_SERVICE(arg0));
212: }
213:
214: public static Localizable localizableINVALID_SOAP_ACTION() {
215: return messageFactory.getMessage("invalid.soap.action");
216: }
217:
218: /**
219: * A valid SOAPAction should be set in the RequestContext when Addressing is enabled, Use BindingProvider.SOAPACTION_URI_PROPERTY to set it.
220: *
221: */
222: public static String INVALID_SOAP_ACTION() {
223: return localizer.localize(localizableINVALID_SOAP_ACTION());
224: }
225:
226: public static Localizable localizableNON_LOGICAL_HANDLER_SET(
227: Object arg0) {
228: return messageFactory.getMessage("non.logical.handler.set",
229: arg0);
230: }
231:
232: /**
233: * Cannot set {0} on binding. Handler must be a LogicalHandler.
234: *
235: */
236: public static String NON_LOGICAL_HANDLER_SET(Object arg0) {
237: return localizer
238: .localize(localizableNON_LOGICAL_HANDLER_SET(arg0));
239: }
240:
241: public static Localizable localizableLOCAL_CLIENT_FAILED(Object arg0) {
242: return messageFactory.getMessage("local.client.failed", arg0);
243: }
244:
245: /**
246: * local transport error: {0}
247: *
248: */
249: public static String LOCAL_CLIENT_FAILED(Object arg0) {
250: return localizer.localize(localizableLOCAL_CLIENT_FAILED(arg0));
251: }
252:
253: public static Localizable localizableRUNTIME_WSDLPARSER_INVALID_WSDL(
254: Object arg0, Object arg1, Object arg2, Object arg3) {
255: return messageFactory.getMessage(
256: "runtime.wsdlparser.invalidWSDL", arg0, arg1, arg2,
257: arg3);
258: }
259:
260: /**
261: * Invalid WSDL {0}, expected {1} found {2} at (line{3})
262: *
263: */
264: public static String RUNTIME_WSDLPARSER_INVALID_WSDL(Object arg0,
265: Object arg1, Object arg2, Object arg3) {
266: return localizer
267: .localize(localizableRUNTIME_WSDLPARSER_INVALID_WSDL(
268: arg0, arg1, arg2, arg3));
269: }
270:
271: public static Localizable localizableWSDL_NOT_FOUND(Object arg0) {
272: return messageFactory.getMessage("wsdl.not.found", arg0);
273: }
274:
275: /**
276: * WSDL url {0} is not accessible.
277: *
278: */
279: public static String WSDL_NOT_FOUND(Object arg0) {
280: return localizer.localize(localizableWSDL_NOT_FOUND(arg0));
281: }
282:
283: public static Localizable localizableHTTP_CLIENT_FAILED(Object arg0) {
284: return messageFactory.getMessage("http.client.failed", arg0);
285: }
286:
287: /**
288: * HTTP transport error: {0}
289: *
290: */
291: public static String HTTP_CLIENT_FAILED(Object arg0) {
292: return localizer.localize(localizableHTTP_CLIENT_FAILED(arg0));
293: }
294:
295: public static Localizable localizableHTTP_CLIENT_CANNOT_CREATE_MESSAGE_FACTORY() {
296: return messageFactory
297: .getMessage("http.client.cannotCreateMessageFactory");
298: }
299:
300: /**
301: * cannot create message factory
302: *
303: */
304: public static String HTTP_CLIENT_CANNOT_CREATE_MESSAGE_FACTORY() {
305: return localizer
306: .localize(localizableHTTP_CLIENT_CANNOT_CREATE_MESSAGE_FACTORY());
307: }
308:
309: public static Localizable localizableINVALID_SERVICE_NAME_NULL(
310: Object arg0) {
311: return messageFactory.getMessage("invalid.service.name.null",
312: arg0);
313: }
314:
315: /**
316: * {0} is not a valid service
317: *
318: */
319: public static String INVALID_SERVICE_NAME_NULL(Object arg0) {
320: return localizer
321: .localize(localizableINVALID_SERVICE_NAME_NULL(arg0));
322: }
323:
324: public static Localizable localizableINVALID_WSDL_URL(Object arg0) {
325: return messageFactory.getMessage("invalid.wsdl.url", arg0);
326: }
327:
328: /**
329: * Invalid WSDL URL: {0}
330: *
331: */
332: public static String INVALID_WSDL_URL(Object arg0) {
333: return localizer.localize(localizableINVALID_WSDL_URL(arg0));
334: }
335:
336: public static Localizable localizableHTTP_CLIENT_UNAUTHORIZED(
337: Object arg0) {
338: return messageFactory.getMessage("http.client.unauthorized",
339: arg0);
340: }
341:
342: /**
343: * request requires HTTP authentication: {0}
344: *
345: */
346: public static String HTTP_CLIENT_UNAUTHORIZED(Object arg0) {
347: return localizer
348: .localize(localizableHTTP_CLIENT_UNAUTHORIZED(arg0));
349: }
350:
351: public static Localizable localizableINVALID_PORT_NAME(Object arg0,
352: Object arg1) {
353: return messageFactory.getMessage("invalid.port.name", arg0,
354: arg1);
355: }
356:
357: /**
358: * {0} is not a valid port. Valid ports are: {1}
359: *
360: */
361: public static String INVALID_PORT_NAME(Object arg0, Object arg1) {
362: return localizer.localize(localizableINVALID_PORT_NAME(arg0,
363: arg1));
364: }
365:
366: public static Localizable localizableINVALID_SERVICE_NAME(
367: Object arg0, Object arg1) {
368: return messageFactory.getMessage("invalid.service.name", arg0,
369: arg1);
370: }
371:
372: /**
373: * {0} is not a valid service. Valid services are: {1}
374: *
375: */
376: public static String INVALID_SERVICE_NAME(Object arg0, Object arg1) {
377: return localizer.localize(localizableINVALID_SERVICE_NAME(arg0,
378: arg1));
379: }
380:
381: public static Localizable localizableUNSUPPORTED_OPERATION(
382: Object arg0, Object arg1, Object arg2) {
383: return messageFactory.getMessage("unsupported.operation", arg0,
384: arg1, arg2);
385: }
386:
387: /**
388: * {0} not supported with {1}. Must be: {2}
389: *
390: */
391: public static String UNSUPPORTED_OPERATION(Object arg0,
392: Object arg1, Object arg2) {
393: return localizer.localize(localizableUNSUPPORTED_OPERATION(
394: arg0, arg1, arg2));
395: }
396:
397: public static Localizable localizableFAILED_TO_PARSE_EPR(Object arg0) {
398: return messageFactory.getMessage("failed.to.parse.epr", arg0);
399: }
400:
401: /**
402: * Failed to parse EPR: {0}
403: *
404: */
405: public static String FAILED_TO_PARSE_EPR(Object arg0) {
406: return localizer.localize(localizableFAILED_TO_PARSE_EPR(arg0));
407: }
408:
409: }
|