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/ProviderApiMessages.java Tue Mar 06 16:09:35 2012 -0800 1.3 @@ -0,0 +1,163 @@ 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 ProviderApiMessages { 1.42 + 1.43 + private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.providerApi"); 1.44 + private final static Localizer localizer = new Localizer(); 1.45 + 1.46 + public static Localizable localizableNULL_ADDRESS_SERVICE_ENDPOINT() { 1.47 + return messageFactory.getMessage("null.address.service.endpoint"); 1.48 + } 1.49 + 1.50 + /** 1.51 + * Address in an EPR cannot be null, when serviceName or portName is null 1.52 + * 1.53 + */ 1.54 + public static String NULL_ADDRESS_SERVICE_ENDPOINT() { 1.55 + return localizer.localize(localizableNULL_ADDRESS_SERVICE_ENDPOINT()); 1.56 + } 1.57 + 1.58 + public static Localizable localizableNO_WSDL_NO_PORT(Object arg0) { 1.59 + return messageFactory.getMessage("no.wsdl.no.port", arg0); 1.60 + } 1.61 + 1.62 + /** 1.63 + * WSDL Metadata not available to create the proxy, either Service instance or ServiceEndpointInterface {0} should have WSDL information 1.64 + * 1.65 + */ 1.66 + public static String NO_WSDL_NO_PORT(Object arg0) { 1.67 + return localizer.localize(localizableNO_WSDL_NO_PORT(arg0)); 1.68 + } 1.69 + 1.70 + public static Localizable localizableNULL_SERVICE() { 1.71 + return messageFactory.getMessage("null.service"); 1.72 + } 1.73 + 1.74 + /** 1.75 + * serviceName can't be null when portName is specified 1.76 + * 1.77 + */ 1.78 + public static String NULL_SERVICE() { 1.79 + return localizer.localize(localizableNULL_SERVICE()); 1.80 + } 1.81 + 1.82 + public static Localizable localizableNULL_ADDRESS() { 1.83 + return messageFactory.getMessage("null.address"); 1.84 + } 1.85 + 1.86 + /** 1.87 + * Address in an EPR cannot be null 1.88 + * 1.89 + */ 1.90 + public static String NULL_ADDRESS() { 1.91 + return localizer.localize(localizableNULL_ADDRESS()); 1.92 + } 1.93 + 1.94 + public static Localizable localizableNULL_PORTNAME() { 1.95 + return messageFactory.getMessage("null.portname"); 1.96 + } 1.97 + 1.98 + /** 1.99 + * EPR doesn't have EndpointName in the Metadata 1.100 + * 1.101 + */ 1.102 + public static String NULL_PORTNAME() { 1.103 + return localizer.localize(localizableNULL_PORTNAME()); 1.104 + } 1.105 + 1.106 + public static Localizable localizableNOTFOUND_SERVICE_IN_WSDL(Object arg0, Object arg1) { 1.107 + return messageFactory.getMessage("notfound.service.in.wsdl", arg0, arg1); 1.108 + } 1.109 + 1.110 + /** 1.111 + * Service: {0} not found in WSDL: {1} 1.112 + * 1.113 + */ 1.114 + public static String NOTFOUND_SERVICE_IN_WSDL(Object arg0, Object arg1) { 1.115 + return localizer.localize(localizableNOTFOUND_SERVICE_IN_WSDL(arg0, arg1)); 1.116 + } 1.117 + 1.118 + public static Localizable localizableNULL_EPR() { 1.119 + return messageFactory.getMessage("null.epr"); 1.120 + } 1.121 + 1.122 + /** 1.123 + * EndpointReference is null 1.124 + * 1.125 + */ 1.126 + public static String NULL_EPR() { 1.127 + return localizer.localize(localizableNULL_EPR()); 1.128 + } 1.129 + 1.130 + public static Localizable localizableNULL_WSDL() { 1.131 + return messageFactory.getMessage("null.wsdl"); 1.132 + } 1.133 + 1.134 + /** 1.135 + * EPR doesn't have WSDL Metadata which is needed for the current operation 1.136 + * 1.137 + */ 1.138 + public static String NULL_WSDL() { 1.139 + return localizer.localize(localizableNULL_WSDL()); 1.140 + } 1.141 + 1.142 + public static Localizable localizableNOTFOUND_PORT_IN_WSDL(Object arg0, Object arg1, Object arg2) { 1.143 + return messageFactory.getMessage("notfound.port.in.wsdl", arg0, arg1, arg2); 1.144 + } 1.145 + 1.146 + /** 1.147 + * Port: {0} not a valid port in Service: {1} in WSDL: {2} 1.148 + * 1.149 + */ 1.150 + public static String NOTFOUND_PORT_IN_WSDL(Object arg0, Object arg1, Object arg2) { 1.151 + return localizer.localize(localizableNOTFOUND_PORT_IN_WSDL(arg0, arg1, arg2)); 1.152 + } 1.153 + 1.154 + public static Localizable localizableERROR_WSDL(Object arg0) { 1.155 + return messageFactory.getMessage("error.wsdl", arg0); 1.156 + } 1.157 + 1.158 + /** 1.159 + * Error in parsing WSDL: {0} 1.160 + * 1.161 + */ 1.162 + public static String ERROR_WSDL(Object arg0) { 1.163 + return localizer.localize(localizableERROR_WSDL(arg0)); 1.164 + } 1.165 + 1.166 +}