cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1546139 - in /cxf/branches/2.6.x-fixes: api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java
Date Wed, 27 Nov 2013 17:44:10 GMT
Author: dkulp
Date: Wed Nov 27 17:44:09 2013
New Revision: 1546139

URL: http://svn.apache.org/r1546139
Log:
Merged revisions 1546131 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes

........
  r1546131 | dkulp | 2013-11-27 12:34:26 -0500 (Wed, 27 Nov 2013) | 10 lines

  Merged revisions 1546067 via  git cherry-pick from
  https://svn.apache.org/repos/asf/cxf/trunk

  ........
    r1546067 | dkulp | 2013-11-27 10:19:37 -0500 (Wed, 27 Nov 2013) | 2 lines

    Make sure we use the constructor that takes the message to work around an issue in geromino-specs
stax-api

  ........

........

Modified:
    cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
    cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java

Modified: cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=1546139&r1=1546138&r2=1546139&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java (original)
+++ cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Wed
Nov 27 17:44:09 2013
@@ -599,7 +599,7 @@ public final class StaxUtils {
                         reader.parse(((SAXSource)source).getInputSource());
                         return;
                     } catch (Exception e) {
-                        throw new XMLStreamException(e);
+                        throw new XMLStreamException(e.getMessage(), e);
                     }
                 } else if (ss.getInputSource() == null) {
                     //nothing to copy, just return
@@ -1883,14 +1883,14 @@ public final class StaxUtils {
             if (allowInsecureParser) {
                 LOG.warning("INSTANCE_NOT_XMLSTREAMREADER2");
             } else {
-                throw new XMLStreamException(cce);
+                throw new XMLStreamException(cce.getMessage(), cce);
             }
         } catch (IllegalArgumentException cce) {
             //not a property supported by this version of woodstox
             if (allowInsecureParser) {
                 LOG.log(Level.WARNING, "SECURE_PROPERTY_NOT_SUPPORTED", cce.getMessage());
             } else {
-                throw new XMLStreamException(cce);
+                throw new XMLStreamException(cce.getMessage(), cce);
             }
         }
         return reader;

Modified: cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java?rev=1546139&r1=1546138&r2=1546139&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java
Wed Nov 27 17:44:09 2013
@@ -230,8 +230,9 @@ public class XMLStreamDataReader impleme
         } else {
             //MSV not available, use a slower method of cloning the data, replace the xop's,
validate
             LOG.fine("NO_MSV_AVAILABLE");
+            Element newElement = rootElement;
             if (DOMUtils.hasElementWithName(rootElement, "http://www.w3.org/2004/08/xop/include",
"Include")) {
-                Element newElement = (Element)rootElement.cloneNode(true);
+                newElement = (Element)rootElement.cloneNode(true);
                 List<Element> elems = DOMUtils.findAllElementsByTagNameNS(newElement,

                                                                           "http://www.w3.org/2004/08/xop/include",
                                                                           "Include");
@@ -242,11 +243,11 @@ public class XMLStreamDataReader impleme
                     //set the fake base64Binary to validate instead of reading the attachment
from message
                     parentNode.setTextContent(javax.xml.bind.DatatypeConverter.printBase64Binary(cid.getBytes()));
                 }
-                try {
-                    schema.newValidator().validate(new DOMSource(newElement));
-                } catch (SAXException e) {
-                    throw new XMLStreamException(e);
-                }
+            }
+            try {
+                schema.newValidator().validate(new DOMSource(newElement));
+            } catch (SAXException e) {
+                throw new XMLStreamException(e.getMessage(), e);
             }
         }
         return rootElement;        



Mime
View raw message