axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ami...@apache.org
Subject svn commit: r548853 - /webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderImpl.java
Date Tue, 19 Jun 2007 20:59:57 GMT
Author: amilas
Date: Tue Jun 19 13:59:56 2007
New Revision: 548853

URL: http://svn.apache.org/viewvc?view=rev&rev=548853
Log:
add attribute QName support to ADBXMLStreamReaderImple

Modified:
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderImpl.java

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderImpl.java?view=diff&rev=548853&r1=548852&r2=548853
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderImpl.java
Tue Jun 19 13:59:56 2007
@@ -451,7 +451,27 @@
                     } else if (attribPointer instanceof String) {
                         return (String)omAttribObj;
                     } else if (attribPointer instanceof QName) {
-                        return (String)omAttribObj;
+                        if (omAttribObj instanceof QName){
+                           QName attributeQName = (QName) omAttribObj;
+                           // first check it is already there if not add the namespace.
+                           String prefix = namespaceContext.getPrefix(attributeQName.getNamespaceURI());
+                           if (prefix == null){
+                               prefix = OMSerializerUtil.getNextNSPrefix();
+                               addToNsMap(prefix,attributeQName.getNamespaceURI());
+                           }
+
+                           String attributeValue = null;
+                           if (prefix.equals("")){
+                               // i.e. this is the default namespace
+                               attributeValue = attributeQName.getLocalPart();
+                           } else {
+                               attributeValue = prefix + ":" + attributeQName.getLocalPart();
+                           }
+                           return attributeValue;
+                        } else {
+                            return (String)omAttribObj;
+                        }
+
                     } else {
                         return null;
                     }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message