You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by he...@apache.org on 2005/07/21 17:12:58 UTC
svn commit: r220101 [2/4] - in /webservices/axis/trunk/java/modules:
core/src/org/apache/axis2/ core/src/org/apache/axis2/clientapi/
core/src/org/apache/axis2/context/ core/src/org/apache/axis2/deployment/
core/src/org/apache/axis2/description/ core/sr...
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java?rev=220101&r1=220100&r2=220101&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java Thu Jul 21 08:12:52 2005
@@ -22,6 +22,7 @@
import org.apache.axis2.context.OperationContext;
import org.apache.axis2.description.OperationDescription;
import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.i18n.Messages;
import org.apache.axis2.om.OMAbstractFactory;
import org.apache.axis2.soap.SOAPBody;
import org.apache.axis2.soap.SOAPEnvelope;
@@ -67,16 +68,20 @@
*/
public void send(MessageContext msgContext) throws AxisFault {
verifyContextBuilt(msgContext);
-
+
//find and invoke the Phases
OperationContext operationContext = msgContext.getOperationContext();
- ArrayList phases = operationContext.getAxisOperation().getPhasesOutFlow();
+ ArrayList phases =
+ operationContext.getAxisOperation().getPhasesOutFlow();
if (msgContext.isPaused()) {
+ // the message has paused, so rerun them from the position they stoped. The Handler
+ //who paused the Message will be the first one to run
+ //resume fixed, global precalulated phases
resumeInvocationPhases(phases, msgContext);
} else {
invokePhases(phases, msgContext);
}
-
+
if (!msgContext.isPaused()) {
//write the Message to the Wire
TransportOutDescription transportOut = msgContext.getTransportOut();
@@ -100,31 +105,40 @@
public void receive(MessageContext msgContext) throws AxisFault {
ConfigurationContext sysCtx = msgContext.getSystemContext();
OperationDescription operationDescription = null;
- ArrayList preCalculatedPhases = sysCtx.getAxisConfiguration().getInPhasesUptoAndIncludingPostDispatch();
+ ArrayList preCalculatedPhases =
+ sysCtx
+ .getAxisConfiguration()
+ .getInPhasesUptoAndIncludingPostDispatch();
ArrayList operationSpecificPhases = null;
-
+
if (msgContext.isPaused()) {
+ // the message has paused, so rerun them from the position they stoped. The Handler
+ //who paused the Message will be the first one to run
+ //resume fixed, global precalulated phases
resumeInvocationPhases(preCalculatedPhases, msgContext);
-
verifyContextBuilt(msgContext);
- OperationContext operationContext = msgContext.getOperationContext();
+ //resume operation specific phases
+ OperationContext operationContext =
+ msgContext.getOperationContext();
operationDescription = operationContext.getAxisOperation();
- operationSpecificPhases = operationDescription.getRemainingPhasesInFlow();
-
+ operationSpecificPhases =
+ operationDescription.getRemainingPhasesInFlow();
resumeInvocationPhases(operationSpecificPhases, msgContext);
-
} else {
invokePhases(preCalculatedPhases, msgContext);
verifyContextBuilt(msgContext);
- OperationContext operationContext = msgContext.getOperationContext();
+ OperationContext operationContext =
+ msgContext.getOperationContext();
operationDescription = operationContext.getAxisOperation();
- operationSpecificPhases = operationDescription.getRemainingPhasesInFlow();
+ operationSpecificPhases =
+ operationDescription.getRemainingPhasesInFlow();
invokePhases(operationSpecificPhases, msgContext);
}
if (msgContext.isServerSide() && !msgContext.isPaused()) {
// invoke the Message Receivers
- MessageReceiver receiver = operationDescription.getMessageReciever();
+ MessageReceiver receiver =
+ operationDescription.getMessageReciever();
receiver.recieve(msgContext);
}
}
@@ -169,7 +183,9 @@
//Dual Channel response. So try to dispatch the Service
ConfigurationContext sysCtx = msgContext.getSystemContext();
ArrayList phases =
- sysCtx.getAxisConfiguration().getInPhasesUptoAndIncludingPostDispatch();
+ sysCtx
+ .getAxisConfiguration()
+ .getInPhasesUptoAndIncludingPostDispatch();
if (msgContext.isPaused()) {
resumeInvocationPhases(phases, msgContext);
@@ -200,13 +216,13 @@
* @param e
* @throws AxisFault
*/
- public MessageContext createFaultMessageContext(MessageContext processingContext, Throwable e)
+ public MessageContext createFaultMessageContext(
+ MessageContext processingContext,
+ Throwable e)
throws AxisFault {
if (processingContext.isProcessingFault()) {
//We get the error file processing the fault. nothing we can do
- throw new AxisFault(
- "Error occured while processing Fault, Previous error is given in the stack trace",
- e);
+ throw new AxisFault(Messages.getMessage("errorwhileProcessingFault"));
}
MessageContext faultContext =
@@ -220,16 +236,17 @@
if (processingContext.getFaultTo() != null) {
faultContext.setFaultTo(processingContext.getFaultTo());
} else {
- Object writer = processingContext.getProperty(MessageContext.TRANSPORT_OUT);
+ Object writer =
+ processingContext.getProperty(MessageContext.TRANSPORT_OUT);
if (writer != null) {
faultContext.setProperty(MessageContext.TRANSPORT_OUT, writer);
} else {
- //TODO Opps there are no place to send this, we will log and should we throw the exception?
- throw new AxisFault("No where to send the Error, the return response path is missing and FaultTo not specified");
+ throw new AxisFault(Messages.getMessage("nowhereToSendError"));
}
}
- faultContext.setOperationContext(processingContext.getOperationContext());
+ faultContext.setOperationContext(
+ processingContext.getOperationContext());
faultContext.setProcessingFault(true);
faultContext.setServerSide(true);
SOAPEnvelope envelope = null;
@@ -237,9 +254,11 @@
if (SOAP12Constants
.SOAP_ENVELOPE_NAMESPACE_URI
.equals(processingContext.getEnvelope().getNamespace().getName())) {
- envelope = OMAbstractFactory.getSOAP12Factory().getDefaultFaultEnvelope();
+ envelope =
+ OMAbstractFactory.getSOAP12Factory().getDefaultFaultEnvelope();
} else {
- envelope = OMAbstractFactory.getSOAP11Factory().getDefaultFaultEnvelope();
+ envelope =
+ OMAbstractFactory.getSOAP11Factory().getDefaultFaultEnvelope();
}
// TODO do we need to set old Headers back?
@@ -247,7 +266,9 @@
// body.addFault(new AxisFault(e.getMessage(), e));
body.getFault().setException(new AxisFault(e));
- extractFaultInformationFromMessageContext(processingContext, envelope.getBody().getFault());
+ extractFaultInformationFromMessageContext(
+ processingContext,
+ envelope.getBody().getFault());
faultContext.setEnvelope(envelope);
sendFault(faultContext);
@@ -257,27 +278,32 @@
private void extractFaultInformationFromMessageContext(
MessageContext context,
SOAPFault fault) {
- Object faultCode = context.getProperty(SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME);
+ Object faultCode =
+ context.getProperty(SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME);
if (faultCode != null) {
fault.setCode((SOAPFaultCode) faultCode);
}
- Object faultReason = context.getProperty(SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME);
+ Object faultReason =
+ context.getProperty(SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME);
if (faultReason != null) {
fault.setReason((SOAPFaultReason) faultReason);
}
- Object faultRole = context.getProperty(SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME);
+ Object faultRole =
+ context.getProperty(SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME);
if (faultRole != null) {
fault.getRole().setText((String) faultRole);
}
- Object faultNode = context.getProperty(SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME);
+ Object faultNode =
+ context.getProperty(SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME);
if (faultNode != null) {
fault.getNode().setText((String) faultNode);
}
- Object faultDetail = context.getProperty(SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME);
+ Object faultDetail =
+ context.getProperty(SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME);
if (faultDetail != null) {
fault.setDetail((SOAPFaultDetail) faultDetail);
}
@@ -285,17 +311,18 @@
private void verifyContextBuilt(MessageContext msgctx) throws AxisFault {
if (msgctx.getSystemContext() == null) {
- throw new AxisFault("ConfigurationContext can not be null");
+ throw new AxisFault(Messages.getMessage("cannotBeNullConfigurationContext"));
}
if (msgctx.getOperationContext() == null) {
- throw new AxisFault("OperationContext can not be null");
+ throw new AxisFault(Messages.getMessage("cannotBeNullOperationContext"));
}
if (msgctx.getServiceContext() == null) {
- throw new AxisFault("ServiceContext can not be null");
+ throw new AxisFault(Messages.getMessage("cannotBeNullServiceContext"));
}
}
- private void invokePhases(ArrayList phases, MessageContext msgctx) throws AxisFault {
+ private void invokePhases(ArrayList phases, MessageContext msgctx)
+ throws AxisFault {
int count = phases.size();
for (int i = 0;(i < count && !msgctx.isPaused()); i++) {
Phase phase = (Phase) phases.get(i);
@@ -303,7 +330,8 @@
}
}
- public void resumeInvocationPhases(ArrayList phases, MessageContext msgctx) throws AxisFault {
+ public void resumeInvocationPhases(ArrayList phases, MessageContext msgctx)
+ throws AxisFault {
msgctx.setPausedFalse();
int count = phases.size();
boolean foundMatch = false;
@@ -312,7 +340,9 @@
Phase phase = (Phase) phases.get(i);
if (phase.getPhaseName().equals(msgctx.getPausedPhaseName())) {
foundMatch = true;
- phase.invokeStartFromHandler(msgctx.getPausedHandlerName(), msgctx);
+ phase.invokeStartFromHandler(
+ msgctx.getPausedHandlerName(),
+ msgctx);
} else {
if (foundMatch) {
phase.invoke(msgctx);
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEvent.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEvent.java?rev=220101&r1=220100&r2=220101&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEvent.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEvent.java Thu Jul 21 08:12:52 2005
@@ -2,8 +2,6 @@
import org.apache.axis2.description.ServiceDescription;
-import java.util.EventObject;
-
/*
* Copyright 2004,2005 The Apache Software Foundation.
*
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/DependencyManager.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/DependencyManager.java?rev=220101&r1=220100&r2=220101&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/DependencyManager.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/DependencyManager.java Thu Jul 21 08:12:52 2005
@@ -22,6 +22,9 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+/**
+ * This one Handlers the dependancy of the Service implemetation are injected before invoke the Service
+ */
public class DependencyManager {
private final static String MESSAGE_CONTEXT_INJECTION_METHOD = "init";
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/DispatchingChecker.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/DispatchingChecker.java?rev=220101&r1=220100&r2=220101&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/DispatchingChecker.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/DispatchingChecker.java Thu Jul 21 08:12:52 2005
@@ -24,7 +24,8 @@
import javax.xml.namespace.QName;
/**
- * Class Dispatcher
+ * This one is run after all the dispatchers and make a Operation and a Service is idenitified
+ * if the message to go any further
*/
public class DispatchingChecker extends AbstractHandler implements Handler {
/**
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/MessageReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/MessageReceiver.java?rev=220101&r1=220100&r2=220101&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/MessageReceiver.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/MessageReceiver.java Thu Jul 21 08:12:52 2005
@@ -18,7 +18,10 @@
import org.apache.axis2.context.MessageContext;
/**
- * Interface Receiver
+ * This one receives the Message, what is does is not of concern for Axis2 (litirally).
+ * Any incomming message is hand over to the MessageReceiver, if the processing produce something
+ * or not as well as is there areany more SOAP Message to be sent or recived is up to the
+ * Message Receiver to decide.
*/
public interface MessageReceiver {
public void recieve(MessageContext messgeCtx) throws AxisFault;
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/MustUnderstandChecker.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/MustUnderstandChecker.java?rev=220101&r1=220100&r2=220101&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/MustUnderstandChecker.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/MustUnderstandChecker.java Thu Jul 21 08:12:52 2005
@@ -20,10 +20,14 @@
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.handlers.AbstractHandler;
+/**
+ * This one check had the SOAP processing Model requirements arte met
+ */
public class MustUnderstandChecker extends AbstractHandler {
public void invoke(MessageContext msgContext) throws AxisFault {
-
+ //TODO do the must understand check here. writing the actual logic is
+ //differed for the next week hackerthone. Today is 21/July/2005
}
}
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java?rev=220101&r1=220100&r2=220101&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java Thu Jul 21 08:12:52 2005
@@ -25,7 +25,7 @@
import javax.xml.namespace.QName;
/**
- * Class Dispatcher
+ * Dispatches the service based on the information from the traget endpoint URL
*/
public class RequestURIBasedDispatcher extends AbstractDispatcher {
/**
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPActionBasedDispatcher.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPActionBasedDispatcher.java?rev=220101&r1=220100&r2=220101&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPActionBasedDispatcher.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPActionBasedDispatcher.java Thu Jul 21 08:12:52 2005
@@ -23,7 +23,7 @@
import javax.xml.namespace.QName;
/**
- * Class Dispatcher
+ * Dispatches based on the SOAPAction
*/
public class SOAPActionBasedDispatcher extends AbstractDispatcher {
/**
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java?rev=220101&r1=220100&r2=220101&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java Thu Jul 21 08:12:52 2005
@@ -26,7 +26,8 @@
import javax.xml.namespace.QName;
/**
- * Class Dispatcher
+ * Dispatches based on the namespace URI of the first child of
+ * the Body.
*/
public class SOAPMessageBodyBasedDispatcher extends AbstractDispatcher {
/**
Added: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/MessageBundle.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/MessageBundle.java?rev=220101&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/MessageBundle.java (added)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/MessageBundle.java Thu Jul 21 08:12:52 2005
@@ -0,0 +1,205 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.i18n;
+
+import java.text.MessageFormat;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * Accept parameters for ProjectResourceBundle,
+ * but defer object instantiation (and therefore
+ * resource bundle loading) until required.
+ *
+ * @author Richard A. Sitze (rsitze@us.ibm.com)
+ * @author Karl Moss (kmoss@macromedia.com)
+ * @author Glen Daniels (gdaniels@apache.org)
+ */
+public class MessageBundle {
+ private boolean loaded = false;
+
+ private ProjectResourceBundle _resourceBundle = null;
+
+ private final String projectName;
+ private final String packageName;
+ private final String resourceName;
+ private final Locale locale;
+ private final ClassLoader classLoader;
+ private final ResourceBundle parent;
+
+
+ public final ProjectResourceBundle getResourceBundle() {
+ if (!loaded) {
+ _resourceBundle = ProjectResourceBundle.getBundle(projectName,
+ packageName,
+ resourceName,
+ locale,
+ classLoader,
+ parent);
+ loaded = true;
+ }
+ return _resourceBundle;
+ }
+
+ /**
+ * Construct a new ExtendMessages
+ */
+ public MessageBundle(String projectName,
+ String packageName,
+ String resourceName,
+ Locale locale,
+ ClassLoader classLoader,
+ ResourceBundle parent)
+ throws MissingResourceException
+ {
+ this.projectName = projectName;
+ this.packageName = packageName;
+ this.resourceName = resourceName;
+ this.locale = locale;
+ this.classLoader = classLoader;
+ this.parent = parent;
+ }
+
+ /**
+ * Gets a string message from the resource bundle for the given key
+ * @param key The resource key
+ * @return The message
+ */
+ public String getMessage(String key) throws MissingResourceException
+ {
+ return getMessage(key, (String[]) null);
+ }
+
+ /**
+ * <p>Gets a string message from the resource bundle for the given key. The
+ * message may contain variables that will be substituted with the given
+ * arguments. Variables have the format:</p>
+ * <dir>
+ * This message has two variables: {0} and {1}
+ * </dir>
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @return The message
+ */
+ public String getMessage(String key, String arg0) throws MissingResourceException
+ {
+ return getMessage(key, new String[] { arg0 });
+ }
+
+ /**
+ * <p>Gets a string message from the resource bundle for the given key. The
+ * message may contain variables that will be substituted with the given
+ * arguments. Variables have the format:</p>
+ * <dir>
+ * This message has two variables: {0} and {1}
+ * </dir>
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @return The message
+ */
+ public String getMessage(String key, String arg0, String arg1) throws MissingResourceException
+ {
+ return getMessage(key, new String[] { arg0, arg1 });
+ }
+
+ /**
+ * <p>Gets a string message from the resource bundle for the given key. The
+ * message may contain variables that will be substituted with the given
+ * arguments. Variables have the format:</p>
+ * <dir>
+ * This message has two variables: {0} and {1}
+ * </dir>
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @param arg2 The argument to place in variable {2}
+ * @return The message
+ */
+ public String getMessage(String key, String arg0, String arg1, String arg2) throws MissingResourceException
+ {
+ return getMessage(key, new String[] { arg0, arg1, arg2 });
+ }
+
+ /**
+ * <p>Gets a string message from the resource bundle for the given key. The
+ * message may contain variables that will be substituted with the given
+ * arguments. Variables have the format:</p>
+ * <dir>
+ * This message has two variables: {0} and {1}
+ * </dir>
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @param arg2 The argument to place in variable {2}
+ * @param arg3 The argument to place in variable {3}
+ * @return The message
+ */
+ public String getMessage(String key, String arg0, String arg1, String arg2, String arg3) throws MissingResourceException
+ {
+ return getMessage(key, new String[] { arg0, arg1, arg2, arg3 });
+ }
+
+ /**
+ * <p>Gets a string message from the resource bundle for the given key. The
+ * message may contain variables that will be substituted with the given
+ * arguments. Variables have the format:</p>
+ * <dir>
+ * This message has two variables: {0} and {1}
+ * </dir>
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @param arg2 The argument to place in variable {2}
+ * @param arg3 The argument to place in variable {3}
+ * @param arg4 The argument to place in variable {4}
+ * @return The message
+ */
+ public String getMessage(String key, String arg0, String arg1, String arg2, String arg3, String arg4) throws MissingResourceException
+ {
+ return getMessage(key, new String[] { arg0, arg1, arg2, arg3, arg4 });
+ }
+
+ /**
+ * <p>Gets a string message from the resource bundle for the given key. The
+ * message may contain variables that will be substituted with the given
+ * arguments. Variables have the format:</p>
+ * <dir>
+ * This message has two variables: {0} and {1}
+ * </dir>
+ * @param key The resource key
+ * @param array An array of objects to place in corresponding variables
+ * @return The message
+ */
+ public String getMessage(String key, String[] array) throws MissingResourceException
+ {
+ String msg = null;
+ if (getResourceBundle() != null) {
+ msg = getResourceBundle().getString(key);
+ }
+
+ if (msg == null) {
+ throw new MissingResourceException("Cannot find resource key \"" + key +
+ "\" in base name " +
+ getResourceBundle().getResourceName(),
+ getResourceBundle().getResourceName(), key);
+ }
+
+ return MessageFormat.format(msg, array);
+ }
+}
Added: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/Messages.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/Messages.java?rev=220101&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/Messages.java (added)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/Messages.java Thu Jul 21 08:12:52 2005
@@ -0,0 +1,168 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.i18n;
+
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+
+/**
+ * @see org.apache.axis.i18n.Messages
+ *
+ * FUNCTIONAL TEMPLATE for Messages classes.
+ *
+ * Copy this template to your package.
+ *
+ * For subpackages of org.apache.axis.*, the internal constants
+ * are set appropriately. To adapt this scheme to an extension project
+ * (package prefix differs from org.apache.axis.*), edit the projectName
+ * attribute. The others shouldn't need to be changed unless this is
+ * being adapted to a non-AXIS related project..
+ *
+ * @author Richard A. Sitze (rsitze@us.ibm.com)
+ * @author Karl Moss (kmoss@macromedia.com)
+ * @author Glen Daniels (gdaniels@apache.org)
+ */
+public class Messages {
+ private static final Class thisClass = Messages.class;
+
+ private static final String projectName = MessagesConstants.projectName;
+
+ private static final String resourceName = MessagesConstants.resourceName;
+ private static final Locale locale = MessagesConstants.locale;
+
+ private static final String packageName = getPackage(thisClass.getName());
+ private static final ClassLoader classLoader = thisClass.getClassLoader();
+
+ private static final ResourceBundle parent =
+ (MessagesConstants.rootPackageName == packageName)
+ ? null
+ : MessagesConstants.rootBundle;
+
+
+ /***** NO NEED TO CHANGE ANYTHING BELOW *****/
+
+ private static final MessageBundle messageBundle =
+ new MessageBundle(projectName, packageName, resourceName,
+ locale, classLoader, parent);
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ * @param key The resource key
+ * @return The formatted message
+ */
+ public static String getMessage(String key)
+ throws MissingResourceException
+ {
+ return messageBundle.getMessage(key);
+ }
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @return The formatted message
+ */
+ public static String getMessage(String key, String arg0)
+ throws MissingResourceException
+ {
+ return messageBundle.getMessage(key, arg0);
+ }
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @return The formatted message
+ */
+ public static String getMessage(String key, String arg0, String arg1)
+ throws MissingResourceException
+ {
+ return messageBundle.getMessage(key, arg0, arg1);
+ }
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @param arg2 The argument to place in variable {2}
+ * @return The formatted message
+ */
+ public static String getMessage(String key, String arg0, String arg1, String arg2)
+ throws MissingResourceException
+ {
+ return messageBundle.getMessage(key, arg0, arg1, arg2);
+ }
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @param arg2 The argument to place in variable {2}
+ * @param arg3 The argument to place in variable {3}
+ * @return The formatted message
+ */
+ public static String getMessage(String key, String arg0, String arg1, String arg2, String arg3)
+ throws MissingResourceException
+ {
+ return messageBundle.getMessage(key, arg0, arg1, arg2, arg3);
+ }
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @param arg2 The argument to place in variable {2}
+ * @param arg3 The argument to place in variable {3}
+ * @param arg4 The argument to place in variable {4}
+ * @return The formatted message
+ */
+ public static String getMessage(String key, String arg0, String arg1, String arg2, String arg3, String arg4)
+ throws MissingResourceException
+ {
+ return messageBundle.getMessage(key, arg0, arg1, arg2, arg3, arg4);
+ }
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ * @param key The resource key
+ * @param args An array of objects to place in corresponding variables
+ * @return The formatted message
+ */
+ public static String getMessage(String key, String[] args)
+ throws MissingResourceException
+ {
+ return messageBundle.getMessage(key, args);
+ }
+
+ public static ResourceBundle getResourceBundle() {
+ return messageBundle.getResourceBundle();
+ }
+
+ public static MessageBundle getMessageBundle() {
+ return messageBundle;
+ }
+
+ private static final String getPackage(String name) {
+ return name.substring(0, name.lastIndexOf('.')).intern();
+ }
+}
Added: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/MessagesConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/MessagesConstants.java?rev=220101&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/MessagesConstants.java (added)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/MessagesConstants.java Thu Jul 21 08:12:52 2005
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.i18n;
+
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+/**
+ * @author Richard A. Sitze (rsitze@us.ibm.com)
+ */
+public class MessagesConstants {
+ public static final String projectName = "org.apache.axis2".intern();
+ public static final String resourceName = "resource".intern();
+ public static final Locale locale = null;
+
+ public static final String rootPackageName = "org.apache.axis2.i18n".intern();
+
+ public static final ResourceBundle rootBundle =
+ ProjectResourceBundle.getBundle(projectName,
+ rootPackageName,
+ resourceName,
+ locale,
+ MessagesConstants.class.getClassLoader(),
+ null);
+}
Added: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/ProjectResourceBundle.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/ProjectResourceBundle.java?rev=220101&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/ProjectResourceBundle.java (added)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/ProjectResourceBundle.java Thu Jul 21 08:12:52 2005
@@ -0,0 +1,471 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.i18n;
+
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * <p>Wrapper class for resource bundles. Property files are used to store
+ * resource strings, which are the only types of resources available.
+ * Property files can inherit properties from other files so that
+ * a base property file can be used and a small number of properties
+ * can be over-ridden by another property file. For example you may
+ * create an english version of a resource file named "resource.properties".
+ * You then decide that the British English version of all of the properties
+ * except one are the same, so there is no need to redefine all of the
+ * properties in "resource_en_GB", just the one that is different.</p>
+ * <p>The basename is the name of the property file without the ".properties"
+ * extension.</p>
+ * <p>Properties will be cached for performance.<p>
+ * <p>Property values stored in the property files can also contain dynamic
+ * variables. Any dynamic variable defined in PropertiesUtil.getVariableValue()
+ * can be used (such as {date}), as well as arguments in the form {0}, {1}, etc.
+ * Argument values are specified in the various overloaded getString() methods.</p>
+ *
+ * @author Richard A. Sitze (rsitze@us.ibm.com)
+ * @author Karl Moss (kmoss@macromedia.com)
+ * @author Glen Daniels (gdaniels@apache.org)
+ */
+public class ProjectResourceBundle extends ResourceBundle {
+ protected static Log log =
+ LogFactory.getLog(ProjectResourceBundle.class.getName());
+
+
+ // The static cache of ResourceBundles.
+ // The key is the 'basename + locale + default locale'
+ // The element is a ResourceBundle object
+ private static final Hashtable bundleCache = new Hashtable();
+
+ private static final Locale defaultLocale = Locale.getDefault();
+
+ private final ResourceBundle resourceBundle;
+ private final String resourceName;
+
+
+ protected Object handleGetObject(String key)
+ throws MissingResourceException
+ {
+ if (log.isDebugEnabled()) {
+ log.debug(this.toString() + "::handleGetObject(" + key + ")");
+ }
+// return resourceBundle.handleGetObject(key);
+ Object obj;
+ try {
+ obj = resourceBundle.getObject(key);
+ } catch (MissingResourceException e) {
+ /* catch missing resource, ignore, & return null
+ * if this method doesn't return null, then parents
+ * are not searched
+ */
+ obj = null;
+ }
+ return obj;
+ }
+
+ public Enumeration getKeys() {
+ Enumeration myKeys = resourceBundle.getKeys();
+ if (parent == null) {
+ return myKeys;
+ } else {
+ final HashSet set = new HashSet();
+ while (myKeys.hasMoreElements()) {
+ set.add(myKeys.nextElement());
+ }
+
+ Enumeration pKeys = parent.getKeys();
+ while (pKeys.hasMoreElements()) {
+ set.add(pKeys.nextElement());
+ }
+
+ return new Enumeration() {
+ private Iterator it = set.iterator();
+ public boolean hasMoreElements() { return it.hasNext(); }
+ public Object nextElement() { return it.next(); }
+ };
+ }
+ }
+
+
+ /**
+ * Construct a new ProjectResourceBundle
+ *
+ * @param projectName The name of the project to which the class belongs.
+ * It must be a proper prefix of the caller's package.
+ *
+ * @param caller The calling class.
+ * This is used to get the package name to further construct
+ * the basename as well as to get the proper ClassLoader.
+ *
+ * @param resourceName The name of the resource without the
+ * ".properties" extension
+ *
+ * @throws MissingResourceException if projectName is not a prefix of
+ * the caller's package name, or if the resource could not be
+ * found/loaded.
+ */
+ public static ProjectResourceBundle getBundle(String projectName,
+ String packageName,
+ String resourceName)
+ throws MissingResourceException
+ {
+ return getBundle(projectName, packageName, resourceName, null, null, null);
+ }
+
+ /**
+ * Construct a new ProjectResourceBundle
+ *
+ * @param projectName The name of the project to which the class belongs.
+ * It must be a proper prefix of the caller's package.
+ *
+ * @param caller The calling class.
+ * This is used to get the package name to further construct
+ * the basename as well as to get the proper ClassLoader.
+ *
+ * @param resourceName The name of the resource without the
+ * ".properties" extension
+ *
+ * @throws MissingResourceException if projectName is not a prefix of
+ * the caller's package name, or if the resource could not be
+ * found/loaded.
+ */
+ public static ProjectResourceBundle getBundle(String projectName,
+ Class caller,
+ String resourceName,
+ Locale locale)
+ throws MissingResourceException
+ {
+ return getBundle(projectName,
+ caller,
+ resourceName,
+ locale,
+ null);
+ }
+
+ /**
+ * Construct a new ProjectResourceBundle
+ *
+ * @param projectName The name of the project to which the class belongs.
+ * It must be a proper prefix of the caller's package.
+ *
+ * @param caller The calling class.
+ * This is used to get the package name to further construct
+ * the basename as well as to get the proper ClassLoader.
+ *
+ * @param resourceName The name of the resource without the
+ * ".properties" extension
+ *
+ * @param locale The locale
+ *
+ * @throws MissingResourceException if projectName is not a prefix of
+ * the caller's package name, or if the resource could not be
+ * found/loaded.
+ */
+ public static ProjectResourceBundle getBundle(String projectName,
+ String packageName,
+ String resourceName,
+ Locale locale,
+ ClassLoader loader)
+ throws MissingResourceException
+ {
+ return getBundle(projectName, packageName, resourceName, locale, loader, null);
+ }
+
+ /**
+ * Construct a new ProjectResourceBundle
+ *
+ * @param projectName The name of the project to which the class belongs.
+ * It must be a proper prefix of the caller's package.
+ *
+ * @param caller The calling class.
+ * This is used to get the package name to further construct
+ * the basename as well as to get the proper ClassLoader.
+ *
+ * @param resourceName The name of the resource without the
+ * ".properties" extension
+ *
+ * @param locale The locale
+ *
+ * @param extendsBundle If non-null, then this ExtendMessages will
+ * default to extendsBundle.
+ *
+ * @throws MissingResourceException if projectName is not a prefix of
+ * the caller's package name, or if the resource could not be
+ * found/loaded.
+ */
+ public static ProjectResourceBundle getBundle(String projectName,
+ Class caller,
+ String resourceName,
+ Locale locale,
+ ResourceBundle extendsBundle)
+ throws MissingResourceException
+ {
+ return getBundle(projectName,
+ getPackage(caller.getClass().getName()),
+ resourceName,
+ locale,
+ caller.getClass().getClassLoader(),
+ extendsBundle);
+ }
+
+ /**
+ * Construct a new ProjectResourceBundle
+ *
+ * @param projectName The name of the project to which the class belongs.
+ * It must be a proper prefix of the caller's package.
+ *
+ * @param caller The calling class.
+ * This is used to get the package name to further construct
+ * the basename as well as to get the proper ClassLoader.
+ *
+ * @param resourceName The name of the resource without the
+ * ".properties" extension
+ *
+ * @param locale The locale
+ *
+ * @param extendsBundle If non-null, then this ExtendMessages will
+ * default to extendsBundle.
+ *
+ * @throws MissingResourceException if projectName is not a prefix of
+ * the caller's package name, or if the resource could not be
+ * found/loaded.
+ */
+ public static ProjectResourceBundle getBundle(String projectName,
+ String packageName,
+ String resourceName,
+ Locale locale,
+ ClassLoader loader,
+ ResourceBundle extendsBundle)
+ throws MissingResourceException
+ {
+ if (log.isDebugEnabled()) {
+ log.debug("getBundle(" + projectName + ","
+ + packageName + ","
+ + resourceName + ","
+ + String.valueOf(locale) + ",...)");
+ }
+
+ Context context = new Context();
+ context.setLocale(locale);
+ context.setLoader(loader);
+ context.setProjectName(projectName);
+ context.setResourceName(resourceName);
+ context.setParentBundle(extendsBundle);
+
+ packageName = context.validate(packageName);
+
+ ProjectResourceBundle bundle = null;
+ try {
+ bundle = getBundle(context, packageName);
+ } catch (RuntimeException e) {
+ log.debug("Exception: ", e);
+ throw e;
+ }
+
+ if (bundle == null) {
+ throw new MissingResourceException("Cannot find resource '" +
+ packageName + '.' + resourceName + "'",
+ resourceName, "");
+ }
+
+ return bundle;
+ }
+
+ /**
+ * get bundle...
+ * - check cache
+ * - try up hierarchy
+ * - if at top of hierarchy, use (link to) context.getParentBundle()
+ */
+ private static synchronized ProjectResourceBundle getBundle(Context context, String packageName)
+ throws MissingResourceException
+ {
+ String cacheKey = context.getCacheKey(packageName);
+
+ ProjectResourceBundle prb = (ProjectResourceBundle)bundleCache.get(cacheKey);
+
+ if (prb == null) {
+ String name = packageName + '.' + context.getResourceName();
+ ResourceBundle rb = context.loadBundle(packageName);
+ ResourceBundle parent = context.getParentBundle(packageName);
+
+ if (rb != null) {
+ prb = new ProjectResourceBundle(name, rb);
+ prb.setParent(parent);
+ if (log.isDebugEnabled()) {
+ log.debug("Created " + prb + ", linked to parent " + String.valueOf(parent));
+ }
+ } else {
+ if (parent != null) {
+ if (parent instanceof ProjectResourceBundle) {
+ prb = (ProjectResourceBundle)parent;
+ } else {
+ prb = new ProjectResourceBundle(name, parent);
+ }
+ if (log.isDebugEnabled()) {
+ log.debug("Root package not found, cross link to " + parent);
+ }
+ }
+ }
+
+ if (prb != null) {
+ // Cache the resource
+ bundleCache.put(cacheKey, prb);
+ }
+ }
+
+ return prb;
+ }
+
+ private static final String getPackage(String name) {
+ return name.substring(0, name.lastIndexOf('.')).intern();
+ }
+
+ /**
+ * Construct a new ProjectResourceBundle
+ */
+ private ProjectResourceBundle(String name, ResourceBundle bundle)
+ throws MissingResourceException
+ {
+ this.resourceBundle = bundle;
+ this.resourceName = name;
+ }
+
+ public String getResourceName() {
+ return resourceName;
+ }
+
+ /**
+ * Clears the internal cache
+ */
+ public static void clearCache()
+ {
+ bundleCache.clear();
+ }
+
+ public String toString() {
+ return resourceName;
+ }
+
+
+ private static class Context {
+ private Locale _locale;
+ private ClassLoader _loader;
+ private String _projectName;
+ private String _resourceName;
+ private ResourceBundle _parent;
+
+ void setLocale(Locale l) {
+ /* 1. Docs indicate that if locale is not specified,
+ * then the default local is used in it's place.
+ * 2. A null value for locale is invalid.
+ *
+ * Therefore, default...
+ */
+ _locale = (l == null) ? defaultLocale : l;
+ }
+
+ void setLoader(ClassLoader l) {
+ _loader = (l != null) ? l : this.getClass().getClassLoader();
+ // START FIX: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16868
+ if (_loader == null) {
+ _loader = ClassLoader.getSystemClassLoader();
+ }
+ // END FIX: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16868
+ }
+
+ void setProjectName(String name) { _projectName = name.intern(); }
+ void setResourceName(String name) { _resourceName = name.intern(); }
+ void setParentBundle(ResourceBundle b) { _parent = b; }
+
+ Locale getLocale() { return _locale; }
+ ClassLoader getLoader() { return _loader; }
+ String getProjectName() { return _projectName; }
+ String getResourceName() { return _resourceName; }
+ ResourceBundle getParentBundle() { return _parent; }
+
+ String getCacheKey(String packageName)
+ {
+ String loaderName = (_loader == null) ? "" : (":" + _loader.hashCode());
+ return packageName + "." + _resourceName + ":" + _locale + ":" + defaultLocale + loaderName;
+ }
+
+ ResourceBundle loadBundle(String packageName)
+ {
+ try {
+ return ResourceBundle.getBundle(packageName + '.' + _resourceName,
+ _locale,
+ _loader);
+ } catch (MissingResourceException e) {
+ // Deliberately surpressing print stack.. just the string for info.
+ log.debug("loadBundle: Ignoring MissingResourceException: " + e.getMessage());
+ }
+ return null;
+ }
+
+ ResourceBundle getParentBundle(String packageName)
+ {
+ ResourceBundle p;
+ if (packageName != _projectName) {
+ p = getBundle(this, getPackage(packageName));
+ } else {
+ p = _parent;
+ _parent = null;
+ }
+ return p;
+ }
+
+ String validate(String packageName)
+ throws MissingResourceException
+ {
+ if (_projectName == null || _projectName.length() == 0) {
+ log.debug("Project name not specified");
+ throw new MissingResourceException("Project name not specified",
+ "", "");
+ }
+
+ if (packageName == null || packageName.length() == 0) {
+ log.debug("Package name not specified");
+ throw new MissingResourceException("Package not specified",
+ packageName, "");
+ }
+ packageName = packageName.intern();
+
+ /* Ensure that project is a proper prefix of class.
+ * Terminate project name with '.' to ensure proper match.
+ */
+ if (packageName != _projectName && !packageName.startsWith(_projectName + '.')) {
+ log.debug("Project not a prefix of Package");
+ throw new MissingResourceException("Project '" + _projectName
+ + "' must be a prefix of Package '"
+ + packageName + "'",
+ packageName + '.' + _resourceName, "");
+ }
+
+ return packageName;
+ }
+ }
+}
Added: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/RB.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/RB.java?rev=220101&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/RB.java (added)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/RB.java Thu Jul 21 08:12:52 2005
@@ -0,0 +1,737 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.i18n;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.MessageFormat;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.Properties;
+
+/**
+ * CURRENTLY NOT USED
+ * KEEPING FOR REFERENCE 9/19/2002
+ *
+ * <p>Wrapper class for resource bundles. Property files are used to store
+ * resource strings, which are the only types of resources available.
+ * Property files can inherit properties from other files so that
+ * a base property file can be used and a small number of properties
+ * can be over-ridden by another property file. For example you may
+ * create an english version of a resource file named "resource.properties".
+ * You then decide that the British English version of all of the properties
+ * except one are the same, so there is no need to redefine all of the
+ * properties in "resource_en_GB", just the one that is different.</p>
+ * <p>The property file lookup searches for classes with various suffixes
+ * on the basis if the desired local and the current default local
+ * (as returned by Local.getDefault()). As property files are found the
+ * property values are merged so that inheritance is preserved.</p>
+ * <p>The order of searching is:</p>
+ * <dir>
+ * basename + "_" + langage + "_" + country + "_" + variant
+ * basename + "_" + langage + "_" + country
+ * basename + "_" + langage
+ * basename + "_" + defaultLanguage + "_" + defaultCountry + "_" + defaultVariant
+ * basename + "_" + defaultLanguage + "_" + defaultCountry
+ * basename + "_" + defaultLanguage
+ * basename
+ * </dir>
+ * <p>The basename is the name of the property file without the ".properties"
+ * extension.</p>
+ * <p>Properties will be cached for performance.<p>
+ * <p>Property values stored in the property files can also contain dynamic
+ * variables. Any dynamic variable defined in PropertiesUtil.getVariableValue()
+ * can be used (such as {date}), as well as arguments in the form {0}, {1}, etc.
+ * Argument values are specified in the various overloaded getString() methods.</p>
+ *
+ * @author Karl Moss (kmoss@macromedia.com)
+ * @author Glen Daniels (gdaniels@apache.org)
+ */
+public class RB {
+ // The static cache of properties. The key is the basename + the local +
+ // the default local and the element is the Properties object containing
+ // the resources
+ static Hashtable propertyCache = new Hashtable();
+
+ // The default base name
+ public static final String BASE_NAME = "resource";
+
+ // The property file extension
+ public static final String PROPERTY_EXT = ".properties";
+
+ // The name of the current base property file (with extension)
+ protected String basePropertyFileName;
+
+ // The properties for the current resource bundle
+ protected Properties resourceProperties;
+
+ /**
+ * Construct a new RB
+ * @param name The name of the property file without the ".properties" extension
+ */
+ public RB(String name) throws MissingResourceException
+ {
+ this(null, name, null);
+ }
+
+ /**
+ * Construct a new RB
+ * @param caller The calling object. This is used to get the package name
+ * to further construct the basename as well as to get the proper ClassLoader
+ * @param name The name of the property file without the ".properties" extension
+ */
+ public RB(Object caller, String name) throws MissingResourceException
+ {
+ this(caller, name, null);
+ }
+
+ /**
+ * Construct a new RB
+ * @param caller The calling object. This is used to get the package name
+ * to further construct the basename as well as to get the proper ClassLoader
+ * @param name The name of the property file without the ".properties" extension
+ * @param local The local
+ */
+ public RB(Object caller, String name, Locale locale) throws MissingResourceException
+ {
+ ClassLoader cl = null;
+
+ if (caller != null) {
+
+ Class c;
+ if (caller instanceof Class) {
+ c = (Class) caller;
+ }
+ else {
+ c = caller.getClass();
+ }
+
+ // Get the appropriate class loader
+ cl = c.getClassLoader();
+
+ if (name.indexOf("/") == -1) {
+
+ // Create the full basename only if not given
+ String fullName = c.getName();
+
+ int pos = fullName.lastIndexOf(".");
+ if (pos > 0) {
+ name = fullName.substring(0, pos + 1).replace('.', '/') + name;
+ }
+ }
+ } else {
+ // Try the shared default properties file...
+ if (name.indexOf("/") == -1) {
+ name = "org/apache/axis/default-resource";
+ }
+ }
+
+ Locale defaultLocale = Locale.getDefault();
+
+ // If the locale given is the same as the default locale, ignore it
+ if (locale != null) {
+ if (locale.equals(defaultLocale)) {
+ locale = null;
+ }
+ }
+
+ // Load the properties. If no property files exist then a
+ // MissingResourceException will be thrown
+ loadProperties(name, cl, locale, defaultLocale);
+ }
+
+ /**
+ * Gets a string message from the resource bundle for the given key
+ * @param key The resource key
+ * @return The message
+ */
+ public String getString(String key) throws MissingResourceException
+ {
+ return getString(key, (Object[]) null);
+ }
+
+ /**
+ * <p>Gets a string message from the resource bundle for the given key. The
+ * message may contain variables that will be substituted with the given
+ * arguments. Variables have the format:</p>
+ * <dir>
+ * This message has two variables: {0} and {1}
+ * </dir>
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @return The message
+ */
+ public String getString(String key, Object arg0) throws MissingResourceException
+ {
+ Object[] o = new Object[1];
+ o[0] = arg0;
+ return getString(key, o);
+ }
+
+ /**
+ * <p>Gets a string message from the resource bundle for the given key. The
+ * message may contain variables that will be substituted with the given
+ * arguments. Variables have the format:</p>
+ * <dir>
+ * This message has two variables: {0} and {1}
+ * </dir>
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @return The message
+ */
+ public String getString(String key, Object arg0, Object arg1) throws MissingResourceException
+ {
+ Object[] o = new Object[2];
+ o[0] = arg0;
+ o[1] = arg1;
+ return getString(key, o);
+ }
+
+ /**
+ * <p>Gets a string message from the resource bundle for the given key. The
+ * message may contain variables that will be substituted with the given
+ * arguments. Variables have the format:</p>
+ * <dir>
+ * This message has two variables: {0} and {1}
+ * </dir>
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @param arg2 The argument to place in variable {1}
+ * @return The message
+ */
+ public String getString(String key, Object arg0, Object arg1, Object arg2) throws MissingResourceException
+ {
+ Object[] o = new Object[3];
+ o[0] = arg0;
+ o[1] = arg1;
+ o[2] = arg2;
+ return getString(key, o);
+ }
+
+ /**
+ * <p>Gets a string message from the resource bundle for the given key. The
+ * message may contain variables that will be substituted with the given
+ * arguments. Variables have the format:</p>
+ * <dir>
+ * This message has two variables: {0} and {1}
+ * </dir>
+ * @param key The resource key
+ * @param array An array of objects to place in corresponding variables
+ * @return The message
+ */
+ public String getString(String key, Object[] array) throws MissingResourceException
+ {
+ String msg = null;
+ if (resourceProperties != null) {
+ msg = resourceProperties.getProperty(key);
+ }
+
+ if (msg == null) {
+ throw new MissingResourceException("Cannot find resource key \"" + key +
+ "\" in base name " + basePropertyFileName,
+ basePropertyFileName, key);
+ }
+
+ msg = MessageFormat.format(msg, array);
+ return msg;
+ }
+
+ protected void loadProperties(String basename, ClassLoader loader, Locale locale,
+ Locale defaultLocale)
+ throws MissingResourceException
+ {
+ // Check the cache first
+ String loaderName = "";
+ if (loader != null) {
+ loaderName = ":" + loader.hashCode();
+ }
+ String cacheKey = basename + ":" + locale + ":" + defaultLocale + loaderName;
+ Properties p = (Properties) propertyCache.get(cacheKey);
+ basePropertyFileName = basename + PROPERTY_EXT;
+
+ if (p == null) {
+ // The properties were not found in the cache. Search the given locale
+ // first
+ if (locale != null) {
+ p = loadProperties(basename, loader, locale, p);
+ }
+
+ // Search the default locale
+ if (defaultLocale != null) {
+ p = loadProperties(basename, loader, defaultLocale, p);
+ }
+
+ // Search for the basename
+ p = merge(p, loadProperties(basePropertyFileName, loader));
+
+ if (p == null) {
+ throw new MissingResourceException("Cannot find resource for base name " +
+ basePropertyFileName, basePropertyFileName, "");
+ }
+
+ // Cache the properties
+ propertyCache.put(cacheKey, p);
+
+ }
+
+ resourceProperties = p;
+ }
+
+ protected Properties loadProperties(String basename, ClassLoader loader, Locale locale,
+ Properties props)
+ {
+
+ String language = locale.getLanguage();
+ String country = locale.getCountry();
+ String variant = locale.getVariant();
+ if (variant != null) {
+ if (variant.trim().length() == 0) {
+ variant = null;
+ }
+ }
+
+ if (language != null) {
+
+ if (country != null) {
+
+ if (variant != null) {
+ props = merge(props, loadProperties(basename + "_" + language +"_" + country + "_" + variant +
+ PROPERTY_EXT, loader));
+ }
+ props = merge(props, loadProperties(basename + "_" + language +"_" + country +
+ PROPERTY_EXT, loader));
+ }
+ props = merge(props, loadProperties(basename + "_" + language + PROPERTY_EXT, loader));
+ }
+ return props;
+ }
+
+ protected Properties loadProperties(String resname, ClassLoader loader)
+ {
+ Properties props = null;
+
+ // Attempt to open and load the properties
+ InputStream in = null;
+ try {
+ if (loader != null) {
+ in = loader.getResourceAsStream(resname);
+ }
+
+ // Either we're using the system class loader or we didn't find the
+ // resource using the given class loader
+ if (in == null) {
+ in = ClassLoader.getSystemResourceAsStream(resname);
+ }
+ if (in != null) {
+ props = new Properties();
+ try {
+ props.load(in);
+ }
+ catch (IOException ex) {
+ // On error, clear the props
+ props = null;
+ }
+ }
+ }
+ finally {
+ if (in != null) {
+ try {
+ in.close();
+ }
+ catch (Exception ex) {
+ // Ignore error on close
+ }
+ }
+ }
+ return props;
+ }
+
+ /**
+ * Merge two Properties objects
+ */
+ protected Properties merge(Properties p1, Properties p2)
+ {
+ if ((p1 == null) &&
+ (p2 == null)) {
+ return null;
+ }
+ else if (p1 == null) {
+ return p2;
+ }
+ else if (p2 == null) {
+ return p1;
+ }
+
+ // Now merge. p1 takes precedence
+ Enumeration enumeration = p2.keys();
+ while (enumeration.hasMoreElements()) {
+ String key = (String) enumeration.nextElement();
+ if (p1.getProperty(key) == null) {
+ p1.put(key, p2.getProperty(key));
+ }
+ }
+
+ return p1;
+ }
+
+ /**
+ * Get the underlying properties
+ */
+ public Properties getProperties()
+ {
+ return resourceProperties;
+ }
+
+ // STATIC ACCESSORS
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ * @param caller The calling object, used to get the package name and class loader
+ * @param key The resource key
+ * @return The formatted message
+ */
+ public static String getString(Object caller, String key)
+ throws MissingResourceException
+ {
+ return getMessage(caller, BASE_NAME, null, key, null);
+ }
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ * @param caller The calling object, used to get the package name and class loader
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @return The formatted message
+ */
+ public static String getString(Object caller, String key, Object arg0)
+ throws MissingResourceException
+ {
+ Object[] o = new Object[1];
+ o[0] = arg0;
+ return getMessage(caller, BASE_NAME, null, key, o);
+ }
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ * @param caller The calling object, used to get the package name and class loader
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @return The formatted message
+ */
+ public static String getString(Object caller, String key, Object arg0, Object arg1)
+ throws MissingResourceException
+ {
+ Object[] o = new Object[2];
+ o[0] = arg0;
+ o[1] = arg1;
+ return getMessage(caller, BASE_NAME, null, key, o);
+ }
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ * @param caller The calling object, used to get the package name and class loader
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @param arg2 The argument to place in variable {2}
+ * @return The formatted message
+ */
+ public static String getString(Object caller, String key, Object arg0, Object arg1, Object arg2)
+ throws MissingResourceException
+ {
+ Object[] o = new Object[3];
+ o[0] = arg0;
+ o[1] = arg1;
+ o[2] = arg2;
+ return getMessage(caller, BASE_NAME, null, key, o);
+ }
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ * @param caller The calling object, used to get the package name and class loader
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @param arg2 The argument to place in variable {2}
+ * @param arg3 The argument to place in variable {3}
+ * @return The formatted message
+ */
+ public static String getString(Object caller, String key, Object arg0, Object arg1, Object arg2, Object arg3)
+ throws MissingResourceException
+ {
+ Object[] o = new Object[4];
+ o[0] = arg0;
+ o[1] = arg1;
+ o[2] = arg2;
+ o[3] = arg3;
+ return getMessage(caller, BASE_NAME, null, key, o);
+ }
+
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ * @param caller The calling object, used to get the package name and class loader
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @param arg2 The argument to place in variable {2}
+ * @param arg3 The argument to place in variable {3}
+ * @param arg4 The argument to place in variable {4}
+ * @return The formatted message
+ */
+ public static String getString(Object caller, String key, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4)
+ throws MissingResourceException
+ {
+ Object[] o = new Object[5];
+ o[0] = arg0;
+ o[1] = arg1;
+ o[2] = arg2;
+ o[3] = arg3;
+ o[4] = arg4;
+ return getMessage(caller, BASE_NAME, null, key, o);
+ }
+
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ * @param caller The calling object, used to get the package name and class loader
+ * @param key The resource key
+ * @param array An array of objects to place in corresponding variables
+ * @return The formatted message
+ */
+ public static String getString(Object caller, String key, Object[] args)
+ throws MissingResourceException
+ {
+ return getMessage(caller, BASE_NAME, null, key, args);
+ }
+
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ * @param caller The calling object, used to get the package name and class loader
+ * @param locale The locale
+ * @param key The resource key
+ * @return The formatted message
+ */
+ public static String getString(Object caller, Locale locale, String key)
+ throws MissingResourceException
+ {
+ return getMessage(caller, BASE_NAME, locale, key, null);
+ }
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ * @param caller The calling object, used to get the package name and class loader
+ * @param locale The locale
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @return The formatted message
+ */
+ public static String getString(Object caller, Locale locale, String key, Object arg0)
+ throws MissingResourceException
+ {
+ Object[] o = new Object[1];
+ o[0] = arg0;
+ return getMessage(caller, BASE_NAME, locale, key, o);
+ }
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ * @param caller The calling object, used to get the package name and class loader
+ * @param locale The locale
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @return The formatted message
+ */
+ public static String getString(Object caller, Locale locale, String key, Object arg0, Object arg1)
+ throws MissingResourceException
+ {
+ Object[] o = new Object[2];
+ o[0] = arg0;
+ o[1] = arg1;
+ return getMessage(caller, BASE_NAME, locale, key, o);
+ }
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ * @param caller The calling object, used to get the package name and class loader
+ * @param locale The locale
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @param arg2 The argument to place in variable {2}
+ * @return The formatted message
+ */
+ public static String getString(Object caller, Locale locale, String key, Object arg0, Object arg1, Object arg2)
+ throws MissingResourceException
+ {
+ Object[] o = new Object[3];
+ o[0] = arg0;
+ o[1] = arg1;
+ o[2] = arg2;
+ return getMessage(caller, BASE_NAME, locale, key, o);
+ }
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ * @param caller The calling object, used to get the package name and class loader
+ * @param locale The locale
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @param arg2 The argument to place in variable {2}
+ * @param arg3 The argument to place in variable {3}
+ * @return The formatted message
+ */
+ public static String getString(Object caller, Locale locale, String key, Object arg0, Object arg1, Object arg2, Object arg3)
+ throws MissingResourceException
+ {
+ Object[] o = new Object[4];
+ o[0] = arg0;
+ o[1] = arg1;
+ o[2] = arg2;
+ o[3] = arg3;
+ return getMessage(caller, BASE_NAME, locale, key, o);
+ }
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ * @param caller The calling object, used to get the package name and class loader
+ * @param locale The locale
+ * @param key The resource key
+ * @param arg0 The argument to place in variable {0}
+ * @param arg1 The argument to place in variable {1}
+ * @param arg2 The argument to place in variable {2}
+ * @param arg3 The argument to place in variable {3}
+ * @return The formatted message
+ */
+ public static String getString(Object caller, Locale locale, String key, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4)
+ throws MissingResourceException
+ {
+ Object[] o = new Object[5];
+ o[0] = arg0;
+ o[1] = arg1;
+ o[2] = arg2;
+ o[3] = arg3;
+ o[4] = arg4;
+ return getMessage(caller, BASE_NAME, locale, key, o);
+ }
+
+ /**
+ * Get a message from resource.properties from the package of the given object.
+ * @param caller The calling object, used to get the package name and class loader
+ * @param locale The locale
+ * @param key The resource key
+ * @param array An array of objects to place in corresponding variables
+ * @return The formatted message
+ */
+ public static String getString(Object caller, Locale locale, String key, Object[] args)
+ throws MissingResourceException
+ {
+ return getMessage(caller, BASE_NAME, locale, key, args);
+ }
+
+ // Workhorse that does the resource loading and key lookup
+ public static String getMessage(Object caller, String basename, Locale locale, String key,
+ Object[] args)
+ throws MissingResourceException
+ {
+ String msg = null;
+ MissingResourceException firstEx = null;
+ String fullName = null;
+ Class curClass = null;
+ boolean didNull = false;
+
+ if (caller != null) {
+ if(caller instanceof Class)
+ curClass = (Class) caller;
+ else
+ curClass = caller.getClass();
+ }
+
+ while (msg == null) {
+
+ // Get the full name of the resource
+ if (curClass != null) {
+
+ // Create the full basename
+ String pkgName = curClass.getName();
+
+ int pos = pkgName.lastIndexOf(".");
+ if (pos > 0) {
+ fullName = pkgName.substring(0, pos + 1).replace('.', '/') + basename;
+ }
+ else {
+ fullName = basename;
+ }
+ }
+ else {
+ fullName = basename;
+ }
+
+ try {
+ RB rb = new RB(caller, fullName, locale);
+ msg = rb.getString(key, args);
+ }
+ catch (MissingResourceException ex) {
+ if (curClass == null) {
+ throw ex;
+ }
+
+ // Save the first exception
+ if (firstEx == null) {
+ firstEx = ex;
+ }
+
+ // Get the superclass
+ curClass = curClass.getSuperclass();
+ if (curClass == null) {
+ if (didNull)
+ throw firstEx;
+ didNull = true;
+ caller = null;
+ } else {
+ String cname = curClass.getName();
+ if (cname.startsWith("java.") ||
+ cname.startsWith("javax.")) {
+ if (didNull)
+ throw firstEx;
+ didNull = true;
+ caller = null;
+ curClass = null;
+ }
+ }
+ }
+
+ }
+ return msg;
+ }
+
+ /**
+ * Clears the internal cache
+ */
+ public static void clearCache()
+ {
+ propertyCache.clear();
+ }
+}
Added: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/resource.properties
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/resource.properties?rev=220101&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/resource.properties (added)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/i18n/resource.properties Thu Jul 21 08:12:52 2005
@@ -0,0 +1,52 @@
+# Translation instructions.
+# 1. Each message line is of the form key=value.
+# Translate the value, DO NOT translate the key.
+# 2. The messages may contain arguments that will be filled in
+# by the runtime. These are of the form: {0}, {1}, etc.
+# These must appear as is in the message, though the order
+# may be changed to support proper language syntax.
+# 3. If a single quote character is to appear in the resulting
+# message, it must appear in this file as two consecutive
+# single quote characters.
+# 4. Lines beginning with "#" (like this one) are comment lines
+# and may contain translation instructions. They need not be
+# translated unless your translated file, rather than this file,
+# will serve as a base for other translators.
+
+threadpoolshutdown=Thread Pool is already Shutdown
+errorWhileSafeShutDown=Error while safeShutDown
+invaliduser=invalid user name
+invalidSOAPversion=Invalid SOAP URI. Axis2 only supports SOAP 1.1 and 1.2
+cannotInferTransport=Cannot Infer transport from the URL
+cannotBeNullOperationDescription=OperationDescription can not be null
+cannotBeNullServiceContext=ServiceContext can not be null
+cannotBeNullConfigurationContext=ConfigurationContext can not be null
+cannotBeNullOperationContext=ConfigurationContext can not be null
+nowhereToSendError=No where to send the Error, the return response path is missing and FaultTo not specified
+errorwhileProcessingFault=Error occured while processing Fault, Previous error is given in the stack trace
+unSupportedMEP=Unsupported MEP {0}
+mepClientSupportOnly=This mepClient supports only {0} And the Axis Operations suppiled supports {1}
+inputstreamNull=Input stream is Null while reading for the incomming message
+unknownTransport=Unknown transport {0}
+paramIsNotSpecified={0} parameter is not specified
+groovryNoanswer=No answer recieved from groovy side!!!!
+outMessageNull=The OUTPUT message is Null, nothing to write
+canNotBeNull={0} can not be Null
+notFound={0} not found
+transportError=Transport Error {0} Error Message is {1}
+preatureEOS=Premature end of steam
+responseTimeOut=Time out waiting for the Server to send the response
+2channelNeedAddressing=to do two Transport Channels the Addressing Modules must be engeged
+useSeparateListenerLimited=useSeparateListener equals false is only supports by the htpp/tcp and tcp commons transport set as the sender and receiver
+replyNeedStarting=Before ask for ReplyTo the TransportListener Must be started transport is {0}
+filedToOpenSocket=failed to open the scoket
+noRecep4Email=No receptineist found in the Email
+unknownMsgLabel=UnknownMessageLabel {0}
+cannotCorrealteMsg= Can not correlate the Message Operation {0} RelatesTo {1}
+addAfterInvoke00={0}: the chain has already been invoked
+AandBdonotmatch={0} does not match {1} expected {3} but the values was {4}
+rpcNeedmatchingChild=rpc style expect the immediate child of the SOAP body
+unknownStyle=Unknown Style {0}
+rawXmlProivdeIsLimited=Raw Xml provider supports only the methods bearing the signature public OMElement <method-name>(OMElement) where the method name is anything
+methodNotImplemented=Implementation class does not define a method called
+blockInvocationExpectsRes=Blocking invocation always expect a response