camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [camel] branch camel-2.22.x updated: CAMEL-12758:SOAP request causing null namespace URI in SimpleNsStreamWriter (#2503)
Date Tue, 04 Sep 2018 08:02:52 GMT
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-2.22.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-2.22.x by this push:
     new 8ea8d1f  CAMEL-12758:SOAP request causing null namespace URI in SimpleNsStreamWriter
(#2503)
8ea8d1f is described below

commit 8ea8d1ffd2b786154db427bd1509d7330e26d0a3
Author: ramu11 <kramu.k7@gmail.com>
AuthorDate: Tue Sep 4 13:24:50 2018 +0530

    CAMEL-12758:SOAP request causing null namespace URI in SimpleNsStreamWriter (#2503)
---
 .../org/apache/camel/converter/jaxp/XMLStreamReaderInputStream.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/camel-core/src/main/java/org/apache/camel/converter/jaxp/XMLStreamReaderInputStream.java
b/camel-core/src/main/java/org/apache/camel/converter/jaxp/XMLStreamReaderInputStream.java
index 9601742..6344d1d 100644
--- a/camel-core/src/main/java/org/apache/camel/converter/jaxp/XMLStreamReaderInputStream.java
+++ b/camel-core/src/main/java/org/apache/camel/converter/jaxp/XMLStreamReaderInputStream.java
@@ -108,7 +108,9 @@ class XMLStreamReaderInputStream extends InputStream {
                                                   reader.getAttributeValue(i));
                         }
                         for (int i = 0; i < reader.getNamespaceCount(); i++) {
-                            writer.writeNamespace(reader.getNamespacePrefix(i), reader.getNamespaceURI(i));
+                            String namespacePrefix = reader.getNamespacePrefix(i);
+                            String namespaceURI = reader.getNamespaceURI(i);
+                            writer.writeNamespace(namespacePrefix == null ? "" : namespacePrefix,
namespaceURI == null ? "" : namespaceURI);
                         }
                         break;
                     case XMLStreamConstants.END_ELEMENT:


Mime
View raw message