cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1490814 - /cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
Date Fri, 07 Jun 2013 20:46:35 GMT
Author: dkulp
Date: Fri Jun  7 20:46:35 2013
New Revision: 1490814

URL: http://svn.apache.org/r1490814
Log:
[CXF-5070] Make an attempt to map CDATA -> CHARACTERS to work around jaxb issue

Modified:
    cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java

Modified: cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java?rev=1490814&r1=1490813&r2=1490814&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
(original)
+++ cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
Fri Jun  7 20:46:35 2013
@@ -727,7 +727,13 @@ public class JAXBDataBinding implements 
                 is.setPublicId(key);
                 opts.addGrammar(is);
                 try {
-                    schemaCompiler.parseSchema(key, StaxUtils.createXMLStreamReader(ele,
key));
+                    XMLStreamReader reader = new StreamReaderDelegate(StaxUtils.createXMLStreamReader(ele,
key)) {
+                        public int next() throws XMLStreamException {
+                            int i = super.next();
+                            return i == XMLStreamReader.CDATA ? XMLStreamReader.CHARACTERS
: i;
+                        }
+                    };
+                    schemaCompiler.parseSchema(key, reader);
                 } catch (XMLStreamException e) {
                     throw new RuntimeException(e);
                 }



Mime
View raw message