Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 7411 invoked from network); 19 Jun 2007 21:00:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Jun 2007 21:00:19 -0000 Received: (qmail 60523 invoked by uid 500); 19 Jun 2007 21:00:22 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 60422 invoked by uid 500); 19 Jun 2007 21:00:22 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 60409 invoked by uid 500); 19 Jun 2007 21:00:22 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 60404 invoked by uid 99); 19 Jun 2007 21:00:22 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2007 14:00:22 -0700 X-ASF-Spam-Status: No, hits=-99.3 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME,SUBJECT_NOVOWEL X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2007 14:00:18 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 0F5F31A981A; Tue, 19 Jun 2007 13:59:58 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: axis2-cvs@ws.apache.org From: amilas@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070619205958.0F5F31A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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