cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf git commit: [CXF-6900] - Prevent a problem if the SOAP Fault code has no namespace
Date Wed, 01 Jun 2016 14:59:37 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 439abe3d7 -> 92efba580


[CXF-6900] - Prevent a problem if the SOAP Fault code has no namespace


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/92efba58
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/92efba58
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/92efba58

Branch: refs/heads/3.1.x-fixes
Commit: 92efba580fb430d24bcc0410ca078a9182615667
Parents: 439abe3
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Wed Jun 1 15:59:02 2016 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Wed Jun 1 15:59:31 2016 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/binding/soap/saaj/SAAJUtils.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/92efba58/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJUtils.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJUtils.java
b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJUtils.java
index 89cb7f7..f1abe19 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJUtils.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJUtils.java
@@ -62,7 +62,11 @@ public final class SAAJUtils {
                 count++;
                 pfx = "fc" + count;
             }
-            f.addNamespaceDeclaration(pfx, code.getNamespaceURI());
+            if (code.getNamespaceURI() != null && !"".equals(code.getNamespaceURI()))
{
+                f.addNamespaceDeclaration(pfx, code.getNamespaceURI());
+            } else {
+                f.addNamespaceDeclaration(pfx, f.getNamespaceURI());
+            }
             f.setFaultCode(pfx + ":" + code.getLocalPart());
         }
         


Mime
View raw message