You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by da...@apache.org on 2007/01/30 14:11:22 UTC
svn commit: r501397 - in
/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2:
addressing/ addressing/i18n/ handlers/addressing/
Author: davidillsley
Date: Tue Jan 30 05:11:21 2007
New Revision: 501397
URL: http://svn.apache.org/viewvc?view=rev&rev=501397
Log:
First pass at a message bundle for the addressing module
Added:
webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/i18n/AddressingMessages.java
webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/i18n/resource.properties
Modified:
webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/AddressingFaultsHelper.java
webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/AddressingFaultsHelper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/AddressingFaultsHelper.java?view=diff&rev=501397&r1=501396&r2=501397
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/AddressingFaultsHelper.java (original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/AddressingFaultsHelper.java Tue Jan 30 05:11:21 2007
@@ -32,6 +32,7 @@
import org.apache.axis2.Constants;
import org.apache.axis2.addressing.AddressingConstants.Final;
import org.apache.axis2.addressing.AddressingConstants.Submission;
+import org.apache.axis2.addressing.i18n.AddressingMessages;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.OperationContext;
import org.apache.commons.logging.Log;
@@ -53,65 +54,61 @@
if(Submission.FAULT_INVALID_HEADER.equals(faultCodeLocalName)){
if(faultDetail!=null){
- result = "The server failed to process the WS-Addressing header: "+faultDetail+" [Reason]: A header representing a Message Addressing Property is not valid and the message cannot be processed";
+ result = AddressingMessages.getMessage("specificInvalidAddressingHeader", faultDetail);
}else{
- result = "The server failed to process one of the WS-Addressing headers. [Reason]: A header representing a Message Addressing Property is not valid and the message cannot be processed";
+ result = AddressingMessages.getMessage("invalidAddressingHeader");
}
}else if(Final.FAULT_INVALID_HEADER.equals(faultCodeLocalName)){
if(faultDetail!=null){
- result = "The server failed to process the WS-Addressing header: "+faultDetail+" [Reason]: A header representing a Message Addressing Property is not valid and the message cannot be processed";
+ result = AddressingMessages.getMessage("specificInvalidAddressingHeader", faultDetail);
}else{
- result = "The server failed to process one of the WS-Addressing headers. [Reason]: A header representing a Message Addressing Property is not valid and the message cannot be processed";
+ result = AddressingMessages.getMessage("invalidAddressingHeader");
}
}else if("InvalidCardinality".equals(faultCodeLocalName)){
if(faultDetail!=null){
- result = "The server received more than one "+faultDetail+" WS-Addressing header";
+ result = AddressingMessages.getMessage("specificInvalidCardinality", faultDetail);
}else{
- result = "The server received more copies of a WS-Addressing header than expected";
+ result = AddressingMessages.getMessage("invalidCardinality");
}
}else if("MissingAddressInEPR".equals(faultCodeLocalName)){
if(faultDetail!=null){
- result = "The server received more than one "+faultDetail+" WS-Addressing header";
+ result = AddressingMessages.getMessage("specificMissingAddressInEPR", faultDetail);
}else{
- result = "The server received more copies of a WS-Addressing header than expected";
+ result = AddressingMessages.getMessage("missingAddressInEPR");
}
}else if("DuplicateMessageID".equals(faultCodeLocalName)){
- if(faultDetail!=null){
- result = "A "+faultDetail+" header was expected to be an EPR but did not contain an [address].";
- }else{
- result = "A WS-Addressing header was expected to be an EPR but did not contain an [address].";
- }
+ result = AddressingMessages.getMessage("duplicateMessageID");
}else if("ActionMismatch".equals(faultCodeLocalName)){
- result = "WS-Addressing Fault: The SOAPAction and wsa:Action received by the server did not match.";
+ result = AddressingMessages.getMessage("actionMismatch");
}else if(Final.FAULT_ONLY_ANONYMOUS_ADDRESS_SUPPORTED.equals(faultCodeLocalName)){
if(faultDetail!=null){
- result = "The "+faultDetail+" header contained a non-anonymous [address] which is not supported by the server.";
+ result = AddressingMessages.getMessage("specificOnlyAnonymousSupported", faultDetail);
}else{
- result = "A WS-Addressing header contained a non-anonymous [address] which is not supported by the server.";
+ result = AddressingMessages.getMessage("onlyAnonymousSupported");
}
}else if(Final.FAULT_ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED.equals(faultCodeLocalName)){
if(faultDetail!=null){
- result = "The "+faultDetail+" header contained an anonymous [address] which is not supported by the server.";
+ result = AddressingMessages.getMessage("specificOnlyNonAnonSupported", faultDetail);
}else{
- result = "A WS-Addressing header contained an anonymous [address] which is not supported by the server.";
+ result = AddressingMessages.getMessage("onlyNonAnonSupported");
}
}else if(Submission.FAULT_ADDRESSING_HEADER_REQUIRED.equals(faultCodeLocalName)){
if(faultDetail!=null){
- result = "The "+faultDetail+" header is required when WS-Addressing is in use but was not sent.";
+ result = AddressingMessages.getMessage("specificAddressingHeaderRequired", faultDetail);
}else{
- result = "A WS-Addressing header which is required when WS-Addressing is in use was not sent.";
+ result = AddressingMessages.getMessage("addressingHeaderRequired");
}
}else if(Final.FAULT_ADDRESSING_HEADER_REQUIRED.equals(faultCodeLocalName)){
if(faultDetail!=null){
- result = "The "+faultDetail+" header is required when WS-Addressing is in use but was not sent.";
+ result = AddressingMessages.getMessage("specificAddressingHeaderRequired", faultDetail);
}else{
- result = "A WS-Addressing header which is required when WS-Addressing is in use was not sent.";
+ result = AddressingMessages.getMessage("addressingHeaderRequired");
}
}else if(AddressingConstants.FAULT_ACTION_NOT_SUPPORTED.equals(faultCodeLocalName)){
if(faultDetail!=null){
- result = "The server did not recognise the action which it received: "+faultDetail;
+ result = AddressingMessages.getMessage("specificActionNotRecognised", faultDetail);
}else{
- result = "The server did not recognise the action which it received.";
+ result = AddressingMessages.getMessage("actionNotRecognised");
}
}
@@ -128,9 +125,9 @@
}
String namespace = (String) messageContext.getProperty(AddressingConstants.WS_ADDRESSING_VERSION);
if (Submission.WSA_NAMESPACE.equals(namespace)){
- triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":" + incorrectHeaderName, Submission.FAULT_INVALID_HEADER, null, Submission.FAULT_INVALID_HEADER_REASON);
+ triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":" + incorrectHeaderName, Submission.FAULT_INVALID_HEADER, null, AddressingMessages.getMessage("spec.submission.FAULT_INVALID_HEADER_REASON"));
}else{
- triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":" + incorrectHeaderName, Final.FAULT_INVALID_HEADER, "InvalidCardinality", Final.FAULT_INVALID_HEADER_REASON);
+ triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":" + incorrectHeaderName, Final.FAULT_INVALID_HEADER, "InvalidCardinality", AddressingMessages.getMessage("spec.final.FAULT_INVALID_HEADER_REASON"));
}
}
@@ -141,9 +138,9 @@
}
String namespace = (String) messageContext.getProperty(AddressingConstants.WS_ADDRESSING_VERSION);
if (Submission.WSA_NAMESPACE.equals(namespace)){
- triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":" + incorrectHeaderName, Submission.FAULT_INVALID_HEADER, null, Submission.FAULT_INVALID_HEADER_REASON);
+ triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":" + incorrectHeaderName, Submission.FAULT_INVALID_HEADER, null, AddressingMessages.getMessage("spec.submission.FAULT_INVALID_HEADER_REASON"));
}else{
- triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":" + incorrectHeaderName, Final.FAULT_INVALID_HEADER, "MissingAddressInEPR", Final.FAULT_INVALID_HEADER_REASON);
+ triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":" + incorrectHeaderName, Final.FAULT_INVALID_HEADER, "MissingAddressInEPR", AddressingMessages.getMessage("spec.final.FAULT_INVALID_HEADER_REASON"));
}
}
@@ -155,9 +152,9 @@
}
String namespace = (String) messageContext.getProperty(AddressingConstants.WS_ADDRESSING_VERSION);
if (Submission.WSA_NAMESPACE.equals(namespace)){
- triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":Action", Submission.FAULT_INVALID_HEADER, null, Submission.FAULT_INVALID_HEADER_REASON);
+ triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":Action", Submission.FAULT_INVALID_HEADER, null, AddressingMessages.getMessage("spec.submission.FAULT_INVALID_HEADER_REASON"));
}else{
- triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":Action", Final.FAULT_INVALID_HEADER, "ActionMismatch", Final.FAULT_INVALID_HEADER_REASON);
+ triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":Action", Final.FAULT_INVALID_HEADER, "ActionMismatch", AddressingMessages.getMessage("spec.final.FAULT_INVALID_HEADER_REASON"));
}
}
@@ -168,9 +165,9 @@
}
String namespace = (String) messageContext.getProperty(AddressingConstants.WS_ADDRESSING_VERSION);
if (Submission.WSA_NAMESPACE.equals(namespace)){
- triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":" + incorrectHeaderName, Submission.FAULT_INVALID_HEADER, null, Submission.FAULT_INVALID_HEADER_REASON);
+ triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":" + incorrectHeaderName, Submission.FAULT_INVALID_HEADER, null, AddressingMessages.getMessage("spec.submission.FAULT_INVALID_HEADER_REASON"));
}else{
- triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":" + incorrectHeaderName, Final.FAULT_INVALID_HEADER, Final.FAULT_ONLY_ANONYMOUS_ADDRESS_SUPPORTED, Final.FAULT_INVALID_HEADER_REASON);
+ triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":" + incorrectHeaderName, Final.FAULT_INVALID_HEADER, Final.FAULT_ONLY_ANONYMOUS_ADDRESS_SUPPORTED, AddressingMessages.getMessage("spec.final.FAULT_INVALID_HEADER_REASON"));
}
}
@@ -181,9 +178,9 @@
}
String namespace = (String) messageContext.getProperty(AddressingConstants.WS_ADDRESSING_VERSION);
if (Submission.WSA_NAMESPACE.equals(namespace)){
- triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":" + incorrectHeaderName, Submission.FAULT_INVALID_HEADER, null, Submission.FAULT_INVALID_HEADER_REASON);
+ triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":" + incorrectHeaderName, Submission.FAULT_INVALID_HEADER, null, AddressingMessages.getMessage("spec.submission.FAULT_INVALID_HEADER_REASON"));
}else{
- triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":" + incorrectHeaderName, Final.FAULT_INVALID_HEADER, Final.FAULT_ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED, Final.FAULT_INVALID_HEADER_REASON);
+ triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":" + incorrectHeaderName, Final.FAULT_INVALID_HEADER, Final.FAULT_ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED, AddressingMessages.getMessage("spec.final.FAULT_INVALID_HEADER_REASON"));
}
}
@@ -194,9 +191,9 @@
}
String namespace = (String) messageContext.getProperty(AddressingConstants.WS_ADDRESSING_VERSION);
if (Submission.WSA_NAMESPACE.equals(namespace)){
- triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":" + missingHeaderName, Submission.FAULT_ADDRESSING_HEADER_REQUIRED, null, Submission.FAULT_ADDRESSING_HEADER_REQUIRED_REASON);
+ triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":" + missingHeaderName, Submission.FAULT_ADDRESSING_HEADER_REQUIRED, null, AddressingMessages.getMessage("spec.submission.FAULT_ADDRESSING_HEADER_REQUIRED_REASON"));
}else{
- triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":" + missingHeaderName, Final.FAULT_ADDRESSING_HEADER_REQUIRED, null, Final.FAULT_ADDRESSING_HEADER_REQUIRED_REASON);
+ triggerAddressingFault(messageContext, Final.FAULT_HEADER_PROB_HEADER_QNAME, AddressingConstants.WSA_DEFAULT_PREFIX + ":" + missingHeaderName, Final.FAULT_ADDRESSING_HEADER_REQUIRED, null, AddressingMessages.getMessage("spec.final.FAULT_ADDRESSING_HEADER_REQUIRED_REASON"));
}
}
@@ -205,7 +202,7 @@
if(log.isDebugEnabled()){
log.debug("triggerActionNotSupportedFault: messageContext: "+messageContext+" problemAction: "+problemAction);
}
- triggerAddressingFault(messageContext, Final.FAULT_PROBLEM_ACTION_NAME, problemAction, AddressingConstants.FAULT_ACTION_NOT_SUPPORTED, null, AddressingConstants.FAULT_ACTION_NOT_SUPPORTED_REASON);
+ triggerAddressingFault(messageContext, Final.FAULT_PROBLEM_ACTION_NAME, problemAction, AddressingConstants.FAULT_ACTION_NOT_SUPPORTED, null, AddressingMessages.getMessage("spec.FAULT_ACTION_NOT_SUPPORTED_REASON"));
}
// wsa:EndpointUnavailable [Reason] the string "The endpoint is unable to process the message at this time"
Added: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/i18n/AddressingMessages.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/i18n/AddressingMessages.java?view=auto&rev=501397
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/i18n/AddressingMessages.java (added)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/i18n/AddressingMessages.java Tue Jan 30 05:11:21 2007
@@ -0,0 +1,161 @@
+/*
+ * 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.addressing.i18n;
+
+
+import org.apache.axis2.i18n.MessageBundle;
+import org.apache.axis2.i18n.MessagesConstants;
+
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * @see org.apache.axis2.i18n.Messages
+ * The implementation is the same but just
+ * thisClass static reference has AddressingMessages.class
+ */
+public class AddressingMessages {
+
+ //Only this changes from the original class
+ private static Class thisClass = AddressingMessages.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.equals(packageName))
+ ? null
+ : MessagesConstants.rootBundle;
+
+
+ /**
+ * ** NO NEED TO CHANGE ANYTHING BELOW ****
+ */
+
+ private static final MessageBundle messageBundle =
+ new MessageBundle(projectName, packageName, resourceName,
+ locale, classLoader, parent);
+
+ /**
+ * Gets a message from resource.properties from the package of the given object.
+ *
+ * @param key The resource key
+ * @return Returns the formatted message.
+ */
+ public static String getMessage(String key)
+ throws MissingResourceException {
+ return messageBundle.getMessage(key);
+ }
+
+ /**
+ * Gets 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 Returns the formatted message.
+ */
+ public static String getMessage(String key, String arg0)
+ throws MissingResourceException {
+ return messageBundle.getMessage(key, arg0);
+ }
+
+ /**
+ * Gets 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 Returns the formatted message.
+ */
+ public static String getMessage(String key, String arg0, String arg1)
+ throws MissingResourceException {
+ return messageBundle.getMessage(key, arg0, arg1);
+ }
+
+ /**
+ * Gets 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 Returns the formatted message.
+ */
+ public static String getMessage(String key, String arg0, String arg1, String arg2)
+ throws MissingResourceException {
+ return messageBundle.getMessage(key, arg0, arg1, arg2);
+ }
+
+ /**
+ * Gets 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 Returns 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);
+ }
+
+ /**
+ * Gets 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 Returns 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);
+ }
+
+ /**
+ * Gets 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 Returns 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 String getPackage(String name) {
+ return name.substring(0, name.lastIndexOf('.')).intern();
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/i18n/resource.properties
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/i18n/resource.properties?view=auto&rev=501397
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/i18n/resource.properties (added)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/addressing/i18n/resource.properties Tue Jan 30 05:11:21 2007
@@ -0,0 +1,41 @@
+# 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.
+
+outboundNoAction=Unable to determine wsa:Action for outbound message
+
+specificInvalidAddressingHeader=The server failed to process the WS-Addressing header: {0} [Reason]: A header representing a Message Addressing Property is not valid and the message cannot be processed
+invalidAddressingHeader=The server failed to process one of the WS-Addressing headers. [Reason]: A header representing a Message Addressing Property is not valid and the message cannot be processed
+specificInvalidCardinality=The server received more than one {0} WS-Addressing header
+invalidCardinality==The server received more copies of a WS-Addressing header than expected
+specificMissingAddressInEPR=A {0} header was expected to be an EPR but did not contain an [address].
+missingAddressInEPR=A WS-Addressing header was expected to be an EPR but did not contain an [address].
+duplicateMessageID=The server rejected the message because it had a WS-Addressing MessageID which it had processed previously.
+actionMismatch=WS-Addressing Fault: The SOAPAction and wsa:Action received by the server did not match.
+specificOnlyAnonymousSupported=The {0} header contained a non-anonymous [address] which is not supported by the server.
+onlyAnonymousSupported=A WS-Addressing header contained a non-anonymous [address] which is not supported by the server.
+specificOnlyNonAnonSupported=The {0} header contained an anonymous [address] which is not supported by the server.
+onlyNonAnonSupported=A WS-Addressing header contained an anonymous [address] which is not supported by the server.
+specificAddressingHeaderRequired=The {0} header is required when WS-Addressing is in use but was not sent.
+addressingHeaderRequired=A WS-Addressing header which is required when WS-Addressing is in use was not sent.
+specificActionNotRecognised=The server did not recognise the action which it received: {0}
+actionNotRecognised=The server did not recognise the action which it received.
+
+# Spec Fault Strings - DO NOT NLS without contacting developers for advice
+spec.FAULT_ACTION_NOT_SUPPORTED_REASON=The [action] cannot be processed at the receiver.
+spec.final.FAULT_INVALID_HEADER_REASON=A header representing a Message Addressing Property is not valid and the message cannot be processed
+spec.final.FAULT_ADDRESSING_HEADER_REQUIRED_REASON=A required header representing a Message Addressing Property is not present
+spec.submission.FAULT_INVALID_HEADER_REASON=A message information header is not valid and the message cannot be processed. The validity failure can be either structural or semantic, e.g. a [destination] that is not a URI or a [relationship] to a [message id] that was never issued.
+spec.submission.FAULT_ADDRESSING_HEADER_REQUIRED_REASON=A required message information header, To, MessageID, or Action, is not present.
+
\ No newline at end of file
Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java?view=diff&rev=501397&r1=501396&r2=501397
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java (original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java Tue Jan 30 05:11:21 2007
@@ -32,11 +32,13 @@
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.addressing.EndpointReferenceHelper;
import org.apache.axis2.addressing.RelatesTo;
+import org.apache.axis2.addressing.i18n.AddressingMessages;
import org.apache.axis2.client.Options;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.description.HandlerDescription;
import org.apache.axis2.description.Parameter;
import org.apache.axis2.handlers.AbstractHandler;
+import org.apache.axis2.i18n.Messages;
import org.apache.axis2.util.JavaUtils;
import org.apache.axis2.util.Utils;
import org.apache.commons.logging.Log;
@@ -210,7 +212,7 @@
}
// Fault unless validation has been explictily turned off
if(!Utils.isExplicitlyTrue(msgCtxt, AddressingConstants.DISABLE_OUTBOUND_ADDRESSING_VALIDATION)){
- throw new AxisFault("Unable to determine wsa:Action for outbound message");
+ throw new AxisFault(AddressingMessages.getMessage("outboundNoAction"));
}
}else{
if(log.isTraceEnabled()){
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org