axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r532981 - in /webservices/axis2/branches/java/1_2/modules/adb/src/org/apache/axis2/databinding/utils: BeanUtil.java reader/WrappingXMLStreamReader.java
Date Fri, 27 Apr 2007 06:16:16 GMT
Author: deepal
Date: Thu Apr 26 23:16:15 2007
New Revision: 532981

URL: http://svn.apache.org/viewvc?view=rev&rev=532981
Log:
oops , when ask fro prefix it returns local name :)
 - Did improvements to xsi:type handling 

Modified:
    webservices/axis2/branches/java/1_2/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
    webservices/axis2/branches/java/1_2/modules/adb/src/org/apache/axis2/databinding/utils/reader/WrappingXMLStreamReader.java

Modified: webservices/axis2/branches/java/1_2/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java?view=diff&rev=532981&r1=532980&r2=532981
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
(original)
+++ webservices/axis2/branches/java/1_2/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
Thu Apr 26 23:16:15 2007
@@ -275,7 +275,7 @@
             // For some reason, using QName(Constants.XSI_NAMESPACE, "type", "xsi") does
not generate
             // an xsi:type attribtue properly for inner objects. So just using a simple QName("type").
             ArrayList objectAttributes = new ArrayList();
-            objectAttributes.add(new QName("type"));
+            objectAttributes.add(new QName(Constants.XSI_NAMESPACE, "type", "xsi"));
             objectAttributes.add(beanObject.getClass().getName());
             return new ADBXMLStreamReaderImpl(beanName, object.toArray(), objectAttributes.toArray(),
                                               typeTable, qualified);
@@ -317,7 +317,8 @@
             // to support polymorphism in POJO approach.
             // Retrieve the type name of the instance from the 'type' attribute
             // and retrieve the class.
-            String instanceTypeName = beanElement.getAttributeValue(new QName("type"));
+            String instanceTypeName = beanElement.getAttributeValue(
+                    new QName(Constants.XSI_NAMESPACE,"type","xsi"));
             if ((instanceTypeName != null) && (! beanClass.isArray())) {
                 try {
                     beanClass = Class.forName(instanceTypeName);

Modified: webservices/axis2/branches/java/1_2/modules/adb/src/org/apache/axis2/databinding/utils/reader/WrappingXMLStreamReader.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/adb/src/org/apache/axis2/databinding/utils/reader/WrappingXMLStreamReader.java?view=diff&rev=532981&r1=532980&r2=532981
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/adb/src/org/apache/axis2/databinding/utils/reader/WrappingXMLStreamReader.java
(original)
+++ webservices/axis2/branches/java/1_2/modules/adb/src/org/apache/axis2/databinding/utils/reader/WrappingXMLStreamReader.java
Thu Apr 26 23:16:15 2007
@@ -106,7 +106,7 @@
     }
 
     public String getAttributePrefix(int i) {
-        return reader.getAttributeLocalName(i);
+        return reader.getAttributePrefix(i);
     }
 
     public String getAttributeType(int i) {



---------------------------------------------------------------------
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