1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/AddressingMessages.java Tue Mar 06 16:09:35 2012 -0800 1.3 @@ -0,0 +1,391 @@ 1.4 +/* 1.5 + * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.7 + * 1.8 + * This code is free software; you can redistribute it and/or modify it 1.9 + * under the terms of the GNU General Public License version 2 only, as 1.10 + * published by the Free Software Foundation. Oracle designates this 1.11 + * particular file as subject to the "Classpath" exception as provided 1.12 + * by Oracle in the LICENSE file that accompanied this code. 1.13 + * 1.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 1.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.17 + * version 2 for more details (a copy is included in the LICENSE file that 1.18 + * accompanied this code). 1.19 + * 1.20 + * You should have received a copy of the GNU General Public License version 1.21 + * 2 along with this work; if not, write to the Free Software Foundation, 1.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.23 + * 1.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1.25 + * or visit www.oracle.com if you need additional information or have any 1.26 + * questions. 1.27 + */ 1.28 + 1.29 + 1.30 +package com.sun.xml.internal.ws.resources; 1.31 + 1.32 +import com.sun.xml.internal.ws.util.localization.Localizable; 1.33 +import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; 1.34 +import com.sun.xml.internal.ws.util.localization.Localizer; 1.35 + 1.36 + 1.37 +/** 1.38 + * Defines string formatting method for each constant in the resource file 1.39 + * 1.40 + */ 1.41 +public final class AddressingMessages { 1.42 + 1.43 + private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.addressing"); 1.44 + private final static Localizer localizer = new Localizer(); 1.45 + 1.46 + public static Localizable localizableNON_ANONYMOUS_RESPONSE_ONEWAY() { 1.47 + return messageFactory.getMessage("nonAnonymous.response.oneway"); 1.48 + } 1.49 + 1.50 + /** 1.51 + * Ignoring non-anonymous response for one-way message 1.52 + * 1.53 + */ 1.54 + public static String NON_ANONYMOUS_RESPONSE_ONEWAY() { 1.55 + return localizer.localize(localizableNON_ANONYMOUS_RESPONSE_ONEWAY()); 1.56 + } 1.57 + 1.58 + public static Localizable localizableNULL_WSA_HEADERS() { 1.59 + return messageFactory.getMessage("null.wsa.headers"); 1.60 + } 1.61 + 1.62 + /** 1.63 + * No WS-Addressing headers found processing the server inbound request 1.64 + * 1.65 + */ 1.66 + public static String NULL_WSA_HEADERS() { 1.67 + return localizer.localize(localizableNULL_WSA_HEADERS()); 1.68 + } 1.69 + 1.70 + public static Localizable localizableUNKNOWN_WSA_HEADER() { 1.71 + return messageFactory.getMessage("unknown.wsa.header"); 1.72 + } 1.73 + 1.74 + /** 1.75 + * Unknown WS-Addressing header 1.76 + * 1.77 + */ 1.78 + public static String UNKNOWN_WSA_HEADER() { 1.79 + return localizer.localize(localizableUNKNOWN_WSA_HEADER()); 1.80 + } 1.81 + 1.82 + public static Localizable localizableNULL_ACTION() { 1.83 + return messageFactory.getMessage("null.action"); 1.84 + } 1.85 + 1.86 + /** 1.87 + * Populating request Addressing headers and found null Action 1.88 + * 1.89 + */ 1.90 + public static String NULL_ACTION() { 1.91 + return localizer.localize(localizableNULL_ACTION()); 1.92 + } 1.93 + 1.94 + public static Localizable localizableINVALID_WSAW_ANONYMOUS(Object arg0) { 1.95 + return messageFactory.getMessage("invalid.wsaw.anonymous", arg0); 1.96 + } 1.97 + 1.98 + /** 1.99 + * Invalid value obtained from wsaw:Anonymous: "{0}" 1.100 + * 1.101 + */ 1.102 + public static String INVALID_WSAW_ANONYMOUS(Object arg0) { 1.103 + return localizer.localize(localizableINVALID_WSAW_ANONYMOUS(arg0)); 1.104 + } 1.105 + 1.106 + public static Localizable localizableNULL_SOAP_VERSION() { 1.107 + return messageFactory.getMessage("null.soap.version"); 1.108 + } 1.109 + 1.110 + /** 1.111 + * Unexpected null SOAP version 1.112 + * 1.113 + */ 1.114 + public static String NULL_SOAP_VERSION() { 1.115 + return localizer.localize(localizableNULL_SOAP_VERSION()); 1.116 + } 1.117 + 1.118 + public static Localizable localizableWSDL_BOUND_OPERATION_NOT_FOUND(Object arg0) { 1.119 + return messageFactory.getMessage("wsdlBoundOperation.notFound", arg0); 1.120 + } 1.121 + 1.122 + /** 1.123 + * Cannot find an operation in wsdl:binding for "{0}" 1.124 + * 1.125 + */ 1.126 + public static String WSDL_BOUND_OPERATION_NOT_FOUND(Object arg0) { 1.127 + return localizer.localize(localizableWSDL_BOUND_OPERATION_NOT_FOUND(arg0)); 1.128 + } 1.129 + 1.130 + public static Localizable localizableNON_UNIQUE_OPERATION_SIGNATURE(Object arg0, Object arg1, Object arg2, Object arg3) { 1.131 + return messageFactory.getMessage("non.unique.operation.signature", arg0, arg1, arg2, arg3); 1.132 + } 1.133 + 1.134 + /** 1.135 + * 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 1.136 + * 1.137 + */ 1.138 + public static String NON_UNIQUE_OPERATION_SIGNATURE(Object arg0, Object arg1, Object arg2, Object arg3) { 1.139 + return localizer.localize(localizableNON_UNIQUE_OPERATION_SIGNATURE(arg0, arg1, arg2, arg3)); 1.140 + } 1.141 + 1.142 + public static Localizable localizableNON_ANONYMOUS_RESPONSE() { 1.143 + return messageFactory.getMessage("nonAnonymous.response"); 1.144 + } 1.145 + 1.146 + /** 1.147 + * Sending 202 and processing non-anonymous response 1.148 + * 1.149 + */ 1.150 + public static String NON_ANONYMOUS_RESPONSE() { 1.151 + return localizer.localize(localizableNON_ANONYMOUS_RESPONSE()); 1.152 + } 1.153 + 1.154 + public static Localizable localizableVALIDATION_SERVER_NULL_ACTION() { 1.155 + return messageFactory.getMessage("validation.server.nullAction"); 1.156 + } 1.157 + 1.158 + /** 1.159 + * Validating inbound Addressing headers on server and found null Action 1.160 + * 1.161 + */ 1.162 + public static String VALIDATION_SERVER_NULL_ACTION() { 1.163 + return localizer.localize(localizableVALIDATION_SERVER_NULL_ACTION()); 1.164 + } 1.165 + 1.166 + public static Localizable localizableFAULT_TO_CANNOT_PARSE() { 1.167 + return messageFactory.getMessage("faultTo.cannot.parse"); 1.168 + } 1.169 + 1.170 + /** 1.171 + * FaultTo header cannot be parsed 1.172 + * 1.173 + */ 1.174 + public static String FAULT_TO_CANNOT_PARSE() { 1.175 + return localizer.localize(localizableFAULT_TO_CANNOT_PARSE()); 1.176 + } 1.177 + 1.178 + public static Localizable localizableVALIDATION_CLIENT_NULL_ACTION() { 1.179 + return messageFactory.getMessage("validation.client.nullAction"); 1.180 + } 1.181 + 1.182 + /** 1.183 + * Validating inbound Addressing headers on client and found null Action 1.184 + * 1.185 + */ 1.186 + public static String VALIDATION_CLIENT_NULL_ACTION() { 1.187 + return localizer.localize(localizableVALIDATION_CLIENT_NULL_ACTION()); 1.188 + } 1.189 + 1.190 + public static Localizable localizableNULL_MESSAGE() { 1.191 + return messageFactory.getMessage("null.message"); 1.192 + } 1.193 + 1.194 + /** 1.195 + * Null message found when processing the server inbound request and WS-Addressing is required 1.196 + * 1.197 + */ 1.198 + public static String NULL_MESSAGE() { 1.199 + return localizer.localize(localizableNULL_MESSAGE()); 1.200 + } 1.201 + 1.202 + public static Localizable localizableACTION_NOT_SUPPORTED_EXCEPTION(Object arg0) { 1.203 + return messageFactory.getMessage("action.not.supported.exception", arg0); 1.204 + } 1.205 + 1.206 + /** 1.207 + * Action: "{0}" not supported 1.208 + * 1.209 + */ 1.210 + public static String ACTION_NOT_SUPPORTED_EXCEPTION(Object arg0) { 1.211 + return localizer.localize(localizableACTION_NOT_SUPPORTED_EXCEPTION(arg0)); 1.212 + } 1.213 + 1.214 + public static Localizable localizableNON_ANONYMOUS_RESPONSE_NULL_HEADERS(Object arg0) { 1.215 + return messageFactory.getMessage("nonAnonymous.response.nullHeaders", arg0); 1.216 + } 1.217 + 1.218 + /** 1.219 + * No response headers found in non-anonymous response from "{0}" 1.220 + * 1.221 + */ 1.222 + public static String NON_ANONYMOUS_RESPONSE_NULL_HEADERS(Object arg0) { 1.223 + return localizer.localize(localizableNON_ANONYMOUS_RESPONSE_NULL_HEADERS(arg0)); 1.224 + } 1.225 + 1.226 + public static Localizable localizableNON_ANONYMOUS_RESPONSE_SENDING(Object arg0) { 1.227 + return messageFactory.getMessage("nonAnonymous.response.sending", arg0); 1.228 + } 1.229 + 1.230 + /** 1.231 + * Sending non-anonymous reply to "{0}" 1.232 + * 1.233 + */ 1.234 + public static String NON_ANONYMOUS_RESPONSE_SENDING(Object arg0) { 1.235 + return localizer.localize(localizableNON_ANONYMOUS_RESPONSE_SENDING(arg0)); 1.236 + } 1.237 + 1.238 + public static Localizable localizableREPLY_TO_CANNOT_PARSE() { 1.239 + return messageFactory.getMessage("replyTo.cannot.parse"); 1.240 + } 1.241 + 1.242 + /** 1.243 + * ReplyTo header cannot be parsed 1.244 + * 1.245 + */ 1.246 + public static String REPLY_TO_CANNOT_PARSE() { 1.247 + return localizer.localize(localizableREPLY_TO_CANNOT_PARSE()); 1.248 + } 1.249 + 1.250 + public static Localizable localizableINVALID_ADDRESSING_HEADER_EXCEPTION(Object arg0, Object arg1) { 1.251 + return messageFactory.getMessage("invalid.addressing.header.exception", arg0, arg1); 1.252 + } 1.253 + 1.254 + /** 1.255 + * Invalid WS-Addressing header: "{0}",Reason: "{1}" 1.256 + * 1.257 + */ 1.258 + public static String INVALID_ADDRESSING_HEADER_EXCEPTION(Object arg0, Object arg1) { 1.259 + return localizer.localize(localizableINVALID_ADDRESSING_HEADER_EXCEPTION(arg0, arg1)); 1.260 + } 1.261 + 1.262 + public static Localizable localizableWSAW_ANONYMOUS_PROHIBITED() { 1.263 + return messageFactory.getMessage("wsaw.anonymousProhibited"); 1.264 + } 1.265 + 1.266 + /** 1.267 + * Operation has "prohibited" value for wsaw:anonymous in the WSDL, Addressing must be disabled and SOAP message need to be hand-crafted 1.268 + * 1.269 + */ 1.270 + public static String WSAW_ANONYMOUS_PROHIBITED() { 1.271 + return localizer.localize(localizableWSAW_ANONYMOUS_PROHIBITED()); 1.272 + } 1.273 + 1.274 + public static Localizable localizableNULL_WSDL_PORT() { 1.275 + return messageFactory.getMessage("null.wsdlPort"); 1.276 + } 1.277 + 1.278 + /** 1.279 + * Populating request Addressing headers and found null WSDLPort 1.280 + * 1.281 + */ 1.282 + public static String NULL_WSDL_PORT() { 1.283 + return localizer.localize(localizableNULL_WSDL_PORT()); 1.284 + } 1.285 + 1.286 + public static Localizable localizableADDRESSING_SHOULD_BE_ENABLED() { 1.287 + return messageFactory.getMessage("addressing.should.be.enabled."); 1.288 + } 1.289 + 1.290 + /** 1.291 + * Addressing is not enabled 1.292 + * 1.293 + */ 1.294 + public static String ADDRESSING_SHOULD_BE_ENABLED() { 1.295 + return localizer.localize(localizableADDRESSING_SHOULD_BE_ENABLED()); 1.296 + } 1.297 + 1.298 + public static Localizable localizableNULL_ADDRESSING_VERSION() { 1.299 + return messageFactory.getMessage("null.addressing.version"); 1.300 + } 1.301 + 1.302 + /** 1.303 + * Unexpected null Addressing version 1.304 + * 1.305 + */ 1.306 + public static String NULL_ADDRESSING_VERSION() { 1.307 + return localizer.localize(localizableNULL_ADDRESSING_VERSION()); 1.308 + } 1.309 + 1.310 + public static Localizable localizableMISSING_HEADER_EXCEPTION(Object arg0) { 1.311 + return messageFactory.getMessage("missing.header.exception", arg0); 1.312 + } 1.313 + 1.314 + /** 1.315 + * Missing WS-Addressing header: "{0}" 1.316 + * 1.317 + */ 1.318 + public static String MISSING_HEADER_EXCEPTION(Object arg0) { 1.319 + return localizer.localize(localizableMISSING_HEADER_EXCEPTION(arg0)); 1.320 + } 1.321 + 1.322 + public static Localizable localizableNULL_PACKET() { 1.323 + return messageFactory.getMessage("null.packet"); 1.324 + } 1.325 + 1.326 + /** 1.327 + * Populating request Addressing headers and found null Packet 1.328 + * 1.329 + */ 1.330 + public static String NULL_PACKET() { 1.331 + return localizer.localize(localizableNULL_PACKET()); 1.332 + } 1.333 + 1.334 + public static Localizable localizableWRONG_ADDRESSING_VERSION(Object arg0, Object arg1) { 1.335 + return messageFactory.getMessage("wrong.addressing.version", arg0, arg1); 1.336 + } 1.337 + 1.338 + /** 1.339 + * Expected "{0}" version of WS-Addressing but found "{1}" 1.340 + * 1.341 + */ 1.342 + public static String WRONG_ADDRESSING_VERSION(Object arg0, Object arg1) { 1.343 + return localizer.localize(localizableWRONG_ADDRESSING_VERSION(arg0, arg1)); 1.344 + } 1.345 + 1.346 + public static Localizable localizableADDRESSING_NOT_ENABLED(Object arg0) { 1.347 + return messageFactory.getMessage("addressing.notEnabled", arg0); 1.348 + } 1.349 + 1.350 + /** 1.351 + * Addressing is not enabled, {0} should not be included in the pipeline" 1.352 + * 1.353 + */ 1.354 + public static String ADDRESSING_NOT_ENABLED(Object arg0) { 1.355 + return localizer.localize(localizableADDRESSING_NOT_ENABLED(arg0)); 1.356 + } 1.357 + 1.358 + public static Localizable localizableNON_ANONYMOUS_UNKNOWN_PROTOCOL(Object arg0) { 1.359 + return messageFactory.getMessage("nonAnonymous.unknown.protocol", arg0); 1.360 + } 1.361 + 1.362 + /** 1.363 + * Unknown protocol: "{0}" 1.364 + * 1.365 + */ 1.366 + public static String NON_ANONYMOUS_UNKNOWN_PROTOCOL(Object arg0) { 1.367 + return localizer.localize(localizableNON_ANONYMOUS_UNKNOWN_PROTOCOL(arg0)); 1.368 + } 1.369 + 1.370 + public static Localizable localizableNULL_HEADERS() { 1.371 + return messageFactory.getMessage("null.headers"); 1.372 + } 1.373 + 1.374 + /** 1.375 + * No headers found when processing the server inbound request and WS-Addressing is required 1.376 + * 1.377 + */ 1.378 + public static String NULL_HEADERS() { 1.379 + return localizer.localize(localizableNULL_HEADERS()); 1.380 + } 1.381 + 1.382 + public static Localizable localizableNULL_BINDING() { 1.383 + return messageFactory.getMessage("null.binding"); 1.384 + } 1.385 + 1.386 + /** 1.387 + * Populating request Addressing headers and found null Binding 1.388 + * 1.389 + */ 1.390 + public static String NULL_BINDING() { 1.391 + return localizer.localize(localizableNULL_BINDING()); 1.392 + } 1.393 + 1.394 +}