incubator-yoko-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eno...@apache.org
Subject svn commit: r487282 - /incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaStaxObject.java
Date Thu, 14 Dec 2006 18:02:07 GMT
Author: enolan
Date: Thu Dec 14 10:02:06 2006
New Revision: 487282

URL: http://svn.apache.org/viewvc?view=rev&rev=487282
Log:
yoko-244 - cater for wrapped doc stlye with primitive types.

Modified:
    incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaStaxObject.java

Modified: incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaStaxObject.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaStaxObject.java?view=diff&rev=487282&r1=487281&r2=487282
==============================================================================
--- incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaStaxObject.java
(original)
+++ incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaStaxObject.java
Thu Dec 14 10:02:06 2006
@@ -36,6 +36,7 @@
 import javax.xml.stream.events.Characters;
 import javax.xml.stream.events.EndElement;
 import javax.xml.stream.events.StartElement;
+import javax.xml.stream.events.XMLEvent;
 
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.schemas.yoko.bindings.corba.Anonarray;
@@ -274,8 +275,22 @@
         throws CorbaBindingException {
         try {
             StartElement startEl = reader.nextEvent().asStartElement();
-            Characters charEl = reader.nextEvent().asCharacters();
+            // Characters charEl = reader.nextEvent().asCharacters();
+            Characters charEl = null;
+            XMLEvent event = reader.nextEvent();
+            if (event.isStartElement()){
+                charEl = reader.nextEvent().asCharacters();
+                startEl = event.asStartElement();
+            } else {
+                charEl = event.asCharacters();
+            }                                    
+                                    
             reader.nextEvent().asEndElement();
+            event = reader.nextEvent();
+            if (event.isEndElement()) {
+                event.asEndElement();
+            }                
+            
             if (tc.kind().value() == TCKind._tk_any) {
                 Iterator attrIter = startEl.getAttributes();
                 String anySchemaType = null;



Mime
View raw message