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 DispatchMessages {
012:
013: private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory(
014: "com.sun.xml.ws.resources.dispatch");
015: private final static Localizer localizer = new Localizer();
016:
017: public static Localizable localizableINVALID_NULLARG_XMLHTTP_REQUEST_METHOD(
018: Object arg0, Object arg1) {
019: return messageFactory.getMessage(
020: "invalid.nullarg.xmlhttp.request.method", arg0, arg1);
021: }
022:
023: /**
024: * A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals {0} with a Null invocation Argument is not allowed. Must be: {1}
025: *
026: */
027: public static String INVALID_NULLARG_XMLHTTP_REQUEST_METHOD(
028: Object arg0, Object arg1) {
029: return localizer
030: .localize(localizableINVALID_NULLARG_XMLHTTP_REQUEST_METHOD(
031: arg0, arg1));
032: }
033:
034: public static Localizable localizableINVALID_SOAPMESSAGE_DISPATCH_MSGMODE(
035: Object arg0, Object arg1) {
036: return messageFactory.getMessage(
037: "invalid.soapmessage.dispatch.msgmode", arg0, arg1);
038: }
039:
040: /**
041: * Can not create Dispatch<SOAPMessage> of {0}. Must be {1}.
042: *
043: */
044: public static String INVALID_SOAPMESSAGE_DISPATCH_MSGMODE(
045: Object arg0, Object arg1) {
046: return localizer
047: .localize(localizableINVALID_SOAPMESSAGE_DISPATCH_MSGMODE(
048: arg0, arg1));
049: }
050:
051: public static Localizable localizableINVALID_RESPONSE_DESERIALIZATION() {
052: return messageFactory
053: .getMessage("invalid.response.deserialization");
054: }
055:
056: /**
057: * Failed to deserialize the response.
058: *
059: */
060: public static String INVALID_RESPONSE_DESERIALIZATION() {
061: return localizer
062: .localize(localizableINVALID_RESPONSE_DESERIALIZATION());
063: }
064:
065: public static Localizable localizableINVALID_QUERY_LEADING_CHAR(
066: Object arg0) {
067: return messageFactory.getMessage("invalid.query.leading.char",
068: arg0);
069: }
070:
071: /**
072: * Leading '?' of MessageContext.QUERY_STRING: {0} is not valid. Remove '?' and run again.
073: *
074: */
075: public static String INVALID_QUERY_LEADING_CHAR(Object arg0) {
076: return localizer
077: .localize(localizableINVALID_QUERY_LEADING_CHAR(arg0));
078: }
079:
080: public static Localizable localizableINVALID_QUERY_STRING(
081: Object arg0) {
082: return messageFactory.getMessage("invalid.query.string", arg0);
083: }
084:
085: /**
086: * Unable to resolve endpoint address using the supplied query string: {0}.
087: *
088: */
089: public static String INVALID_QUERY_STRING(Object arg0) {
090: return localizer
091: .localize(localizableINVALID_QUERY_STRING(arg0));
092: }
093:
094: public static Localizable localizableDUPLICATE_PORT(Object arg0) {
095: return messageFactory.getMessage("duplicate.port", arg0);
096: }
097:
098: /**
099: * WSDLPort {0} already exists. Can not create a port of the same QName.
100: *
101: */
102: public static String DUPLICATE_PORT(Object arg0) {
103: return localizer.localize(localizableDUPLICATE_PORT(arg0));
104: }
105:
106: public static Localizable localizableINVALID_DATASOURCE_DISPATCH_BINDING(
107: Object arg0, Object arg1) {
108: return messageFactory.getMessage(
109: "invalid.datasource.dispatch.binding", arg0, arg1);
110: }
111:
112: /**
113: * Can not create Dispatch<DataSource> with {0}. Must be: {1}
114: *
115: */
116: public static String INVALID_DATASOURCE_DISPATCH_BINDING(
117: Object arg0, Object arg1) {
118: return localizer
119: .localize(localizableINVALID_DATASOURCE_DISPATCH_BINDING(
120: arg0, arg1));
121: }
122:
123: public static Localizable localizableINVALID_DATASOURCE_DISPATCH_MSGMODE(
124: Object arg0, Object arg1) {
125: return messageFactory.getMessage(
126: "invalid.datasource.dispatch.msgmode", arg0, arg1);
127: }
128:
129: /**
130: * Can not create Dispatch<DataSource> of Service.Mode.PAYLOAD{0}. Must be: {1}
131: *
132: */
133: public static String INVALID_DATASOURCE_DISPATCH_MSGMODE(
134: Object arg0, Object arg1) {
135: return localizer
136: .localize(localizableINVALID_DATASOURCE_DISPATCH_MSGMODE(
137: arg0, arg1));
138: }
139:
140: public static Localizable localizableINVALID_NULLARG_SOAP_MSGMODE(
141: Object arg0, Object arg1) {
142: return messageFactory.getMessage(
143: "invalid.nullarg.soap.msgmode", arg0, arg1);
144: }
145:
146: /**
147: * SOAP/HTTP Binding in {0} is not allowed with a null invocation argument. Must be: {1}
148: *
149: */
150: public static String INVALID_NULLARG_SOAP_MSGMODE(Object arg0,
151: Object arg1) {
152: return localizer
153: .localize(localizableINVALID_NULLARG_SOAP_MSGMODE(arg0,
154: arg1));
155: }
156:
157: public static Localizable localizableINVALID_URI(Object arg0) {
158: return messageFactory.getMessage("invalid.uri", arg0);
159: }
160:
161: /**
162: * Endpoint String: {0} is and invalid URI.
163: *
164: */
165: public static String INVALID_URI(Object arg0) {
166: return localizer.localize(localizableINVALID_URI(arg0));
167: }
168:
169: public static Localizable localizableINVALID_SOAPMESSAGE_DISPATCH_BINDING(
170: Object arg0, Object arg1) {
171: return messageFactory.getMessage(
172: "invalid.soapmessage.dispatch.binding", arg0, arg1);
173: }
174:
175: /**
176: * Can not create Dispatch<SOAPMessage> with {0} Binding. Must be: {1} Binding.
177: *
178: */
179: public static String INVALID_SOAPMESSAGE_DISPATCH_BINDING(
180: Object arg0, Object arg1) {
181: return localizer
182: .localize(localizableINVALID_SOAPMESSAGE_DISPATCH_BINDING(
183: arg0, arg1));
184: }
185:
186: public static Localizable localizableINVALID_URI_PATH_QUERY(
187: Object arg0, Object arg1) {
188: return messageFactory.getMessage("invalid.uri.path.query",
189: arg0, arg1);
190: }
191:
192: /**
193: * Unable to construct a URI with this path info {0} and this query string {1}.
194: *
195: */
196: public static String INVALID_URI_PATH_QUERY(Object arg0, Object arg1) {
197: return localizer.localize(localizableINVALID_URI_PATH_QUERY(
198: arg0, arg1));
199: }
200:
201: public static Localizable localizableINVALID_RESPONSE() {
202: return messageFactory.getMessage("invalid.response");
203: }
204:
205: /**
206: * No response returned.
207: *
208: */
209: public static String INVALID_RESPONSE() {
210: return localizer.localize(localizableINVALID_RESPONSE());
211: }
212:
213: public static Localizable localizableINVALID_URI_RESOLUTION(
214: Object arg0) {
215: return messageFactory
216: .getMessage("invalid.uri.resolution", arg0);
217: }
218:
219: /**
220: * Unable to resolve endpoint address using the supplied path: {0}.
221: *
222: */
223: public static String INVALID_URI_RESOLUTION(Object arg0) {
224: return localizer
225: .localize(localizableINVALID_URI_RESOLUTION(arg0));
226: }
227:
228: public static Localizable localizableINVALID_URI_DECODE() {
229: return messageFactory.getMessage("invalid.uri.decode");
230: }
231:
232: /**
233: * Unable to decode the resolved endpoint using UTF-8 encoding.
234: *
235: */
236: public static String INVALID_URI_DECODE() {
237: return localizer.localize(localizableINVALID_URI_DECODE());
238: }
239:
240: }
|