This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch 1_5
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git
commit 79d7495856c84740c46d53231dd750b669012426
Author: Andreas Veithen <veit...@apache.org>
AuthorDate: Sun Apr 29 20:13:24 2012 +0000

    Merged r1331616 to the 1.5 branch.
---
 .../kernel/src/org/apache/axis2/util/MessageContextBuilder.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/modules/kernel/src/org/apache/axis2/util/MessageContextBuilder.java 
b/modules/kernel/src/org/apache/axis2/util/MessageContextBuilder.java
index d62fb00..5faa6b3 100644
--- a/modules/kernel/src/org/apache/axis2/util/MessageContextBuilder.java
+++ b/modules/kernel/src/org/apache/axis2/util/MessageContextBuilder.java
@@ -482,13 +482,13 @@ public class MessageContextBuilder {
                     if (faultCodeQName.getLocalPart().indexOf(":") == -1) {
                         String prefix = faultCodeQName.getPrefix();
                         String uri = faultCodeQName.getNamespaceURI();
-                        // Get the specified prefix and uri
-                        prefix = prefix == null ? "" : prefix;
+                        // Get the specified uri
                         uri = uri == null || "" .equals(uri) ?
                                 fault.getNamespace().getNamespaceURI() : uri;
                         // Make sure the prefix and uri are declared on the 
fault, and 
-                        // get the resulting prefix.
-                        prefix = fault.declareNamespace(uri, 
prefix).getPrefix();
+                        // get the resulting prefix. If no prefix is defined, 
let declareNamespace
+                        // generate one.
+                        prefix = fault.declareNamespace(uri, prefix.length() 
== 0 ? null : prefix).getPrefix();
                         soapFaultCode = prefix + ":" + 
faultCodeQName.getLocalPart();
                     } else {
                         soapFaultCode = faultCodeQName.getLocalPart();

Reply via email to