camel-commits mailing list archives

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 8173eb6  CAMEL-12758:SOAP request causing null namespace URI in SimpleNsStreamWriter
(#2503)
8173eb6 is described below

commit 8173eb68e3cbe7453f09b2c69a22c90123a329e7
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