cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1182730 - in /cxf/branches/2.4.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/databinding/source/
Date Thu, 13 Oct 2011 09:06:18 GMT
Author: ningjiang
Date: Thu Oct 13 09:06:18 2011
New Revision: 1182730

URL: http://svn.apache.org/viewvc?rev=1182730&view=rev
Log:
Merged revisions 1182716 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1182716 | ningjiang | 2011-10-13 16:31:07 +0800 (Thu, 13 Oct 2011) | 1 line
  
  CXF-3858 Added the cause exception message when throwing the fault from XMLStreamDataReader
and XMLStreamDataWriter
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/Messages.properties
    cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java
    cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataWriter.java
    cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java
    cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataWriter.java

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Oct 13 09:06:18 2011
@@ -1 +1 @@
-/cxf/trunk:1179846,1180649,1180653,1181611-1181612,1182637,1182715
+/cxf/trunk:1179846,1180649,1180653,1181611-1181612,1182637,1182715-1182716

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/Messages.properties
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/Messages.properties?rev=1182730&r1=1182729&r2=1182730&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/Messages.properties
(original)
+++ cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/Messages.properties
Thu Oct 13 09:06:18 2011
@@ -19,3 +19,6 @@
 #
 #
 COULD_NOT_READ_XML_STREAM = Could not parse the XML stream.
+COULD_NOT_WRITE_XML_STREAM = Could not generate the XML stream.
+COULD_NOT_REDA_XML_STREAM_CAUSED_BY = Could not parse the XML stream caused by {0}.
+COULD_NOT_WRITE_XML_STREAM_CAUSED_BY = Could not generate the XML stream caused by {0}.

Modified: cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java?rev=1182730&r1=1182729&r2=1182730&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java
Thu Oct 13 09:06:18 2011
@@ -34,7 +34,6 @@ import javax.xml.validation.Schema;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.databinding.DataReader;
 import org.apache.cxf.helpers.DOMUtils;
@@ -65,9 +64,9 @@ public class NodeDataReader implements D
                 
                 return new StreamSource(is);
             } catch (IOException e) {
-                throw new Fault(new Message("COULD_NOT_READ_XML_STREAM", LOG), e);
+                throw new Fault("COULD_NOT_READ_XML_STREAM", LOG, e);
             } catch (TransformerException e) {
-                throw new Fault(new Message("COULD_NOT_READ_XML_STREAM", LOG), e);
+                throw new Fault("COULD_NOT_REDA_XML_STREAM_CAUSED_BY", LOG, e, e.getMessage());
             } 
         }  
         return read(input);

Modified: cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataWriter.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataWriter.java?rev=1182730&r1=1182729&r2=1182730&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataWriter.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataWriter.java
Thu Oct 13 09:06:18 2011
@@ -30,7 +30,6 @@ import javax.xml.validation.Schema;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.databinding.DataWriter;
 import org.apache.cxf.interceptor.Fault;
@@ -57,7 +56,7 @@ public class NodeDataWriter implements D
             XMLStreamWriter writer = new W3CDOMStreamWriter((Element)n);
             StaxUtils.copy(s, writer);
         } catch (XMLStreamException e) {
-            throw new Fault(new Message("COULD_NOT_READ_XML_STREAM", LOG), e);
+            throw new Fault("COULD_NOT_WRITE_XML_STREAM_CAUSED_BY", LOG, e, e.getMessage());
         }
     }
 

Modified: cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java?rev=1182730&r1=1182729&r2=1182730&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java
Thu Oct 13 09:06:18 2011
@@ -139,9 +139,9 @@ public class XMLStreamDataReader impleme
         } catch (IOException e) {
             throw new Fault("COULD_NOT_READ_XML_STREAM", LOG, e);
         } catch (XMLStreamException e) {
-            throw new Fault("COULD_NOT_READ_XML_STREAM", LOG, e);
+            throw new Fault("COULD_NOT_REDA_XML_STREAM_CAUSED_BY", LOG, e, e.getMessage());
         } catch (SAXException e) {
-            throw new Fault("COULD_NOT_READ_XML_STREAM", LOG, e);
+            throw new Fault("COULD_NOT_REDA_XML_STREAM_CAUSED_BY", LOG, e, e.getMessage());
         }
     }
     
@@ -225,7 +225,7 @@ public class XMLStreamDataReader impleme
                 return new DOMSource(document);
             }
         } catch (XMLStreamException e) {
-            throw new Fault("COULD_NOT_READ_XML_STREAM", LOG, e);
+            throw new Fault("COULD_NOT_REDA_XML_STREAM_CAUSED_BY", LOG, e, e.getMessage());
         }
     }
     

Modified: cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataWriter.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataWriter.java?rev=1182730&r1=1182729&r2=1182730&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataWriter.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataWriter.java
Thu Oct 13 09:06:18 2011
@@ -88,9 +88,9 @@ public class XMLStreamDataWriter impleme
                 StaxUtils.copy(s, writer);
             }
         } catch (XMLStreamException e) {
-            throw new Fault(new Message("COULD_NOT_READ_XML_STREAM", LOG), e);
+            throw new Fault("COULD_NOT_WRITE_XML_STREAM_CAUSED_BY", LOG, e, e.getMessage());
         } catch (IOException e) {
-            throw new Fault(new Message("COULD_NOT_READ_XML_STREAM", LOG), e);
+            throw new Fault(new Message("COULD_NOT_WRITE_XML_STREAM", LOG), e);
         }
     }
 



Mime
View raw message