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 SoapMessages {
012:
013: private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory(
014: "com.sun.xml.ws.resources.soap");
015: private final static Localizer localizer = new Localizer();
016:
017: public static Localizable localizableSOAP_FAULT_CREATE_ERR(
018: Object arg0) {
019: return messageFactory.getMessage("soap.fault.create.err", arg0);
020: }
021:
022: /**
023: * Couldn''t create SOAP Fault due to exception: {0}
024: *
025: */
026: public static String SOAP_FAULT_CREATE_ERR(Object arg0) {
027: return localizer
028: .localize(localizableSOAP_FAULT_CREATE_ERR(arg0));
029: }
030:
031: public static Localizable localizableSOAP_MSG_FACTORY_CREATE_ERR(
032: Object arg0) {
033: return messageFactory.getMessage("soap.msg.factory.create.err",
034: arg0);
035: }
036:
037: /**
038: * Couldn''t create SOAP message factory due to exception: {0}
039: *
040: */
041: public static String SOAP_MSG_FACTORY_CREATE_ERR(Object arg0) {
042: return localizer
043: .localize(localizableSOAP_MSG_FACTORY_CREATE_ERR(arg0));
044: }
045:
046: public static Localizable localizableSOAP_MSG_CREATE_ERR(Object arg0) {
047: return messageFactory.getMessage("soap.msg.create.err", arg0);
048: }
049:
050: /**
051: * Couldn''t create SOAP message due to exception: {0}
052: *
053: */
054: public static String SOAP_MSG_CREATE_ERR(Object arg0) {
055: return localizer.localize(localizableSOAP_MSG_CREATE_ERR(arg0));
056: }
057:
058: public static Localizable localizableSOAP_FACTORY_CREATE_ERR(
059: Object arg0) {
060: return messageFactory.getMessage("soap.factory.create.err",
061: arg0);
062: }
063:
064: /**
065: * Couldn''t create SOAP factory due to exception: {0}
066: *
067: */
068: public static String SOAP_FACTORY_CREATE_ERR(Object arg0) {
069: return localizer
070: .localize(localizableSOAP_FACTORY_CREATE_ERR(arg0));
071: }
072:
073: public static Localizable localizableSOAP_PROTOCOL_INVALID_FAULT_CODE(
074: Object arg0) {
075: return messageFactory.getMessage(
076: "soap.protocol.invalidFaultCode", arg0);
077: }
078:
079: /**
080: * Invalid fault code: {0}
081: *
082: */
083: public static String SOAP_PROTOCOL_INVALID_FAULT_CODE(Object arg0) {
084: return localizer
085: .localize(localizableSOAP_PROTOCOL_INVALID_FAULT_CODE(arg0));
086: }
087:
088: public static Localizable localizableSOAP_VERSION_MISMATCH_ERR(
089: Object arg0, Object arg1) {
090: return messageFactory.getMessage("soap.version.mismatch.err",
091: arg0, arg1);
092: }
093:
094: /**
095: * Couldn''t create SOAP message. Expecting Envelope in namespace {0}, but got {1}
096: *
097: */
098: public static String SOAP_VERSION_MISMATCH_ERR(Object arg0,
099: Object arg1) {
100: return localizer.localize(localizableSOAP_VERSION_MISMATCH_ERR(
101: arg0, arg1));
102: }
103:
104: }
|