cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [13/33] cxf git commit: [CXF-6900] - Prevent a problem if the SOAP Fault code has no namespace
Date Sun, 05 Jun 2016 17:02:41 GMT
[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/3b1ffa60
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/3b1ffa60
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/3b1ffa60

Branch: refs/heads/master-jaxrs-2.1
Commit: 3b1ffa60c510eda213a3adb09478201c6d9dfd03
Parents: 793eebe
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:02 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/3b1ffa60/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