Merged latest changes from trunk.
diff --git a/modules/adb-codegen/test/org/apache/axis2/schema/AbstractTestCase.java b/modules/adb-codegen/test/org/apache/axis2/schema/AbstractTestCase.java
index 2cf3a7f..2336779 100644
--- a/modules/adb-codegen/test/org/apache/axis2/schema/AbstractTestCase.java
+++ b/modules/adb-codegen/test/org/apache/axis2/schema/AbstractTestCase.java
@@ -288,12 +288,12 @@
     public static void testSerializeDeserialize(ADBBean bean, ADBBean expectedResult) throws Exception {
         testSerializeDeserializeUsingStAX(bean, expectedResult);
         testSerializeDeserializeUsingOMStAXWrapper(bean, expectedResult);
-        
         testSerializeDeserializeWrapped(bean, expectedResult);
         testSerializeDeserializeUsingMTOM(bean, expectedResult, true);
         testSerializeDeserializeUsingMTOM(bean, expectedResult, false);
         testSerializeDeserializeUsingMTOMWithoutOptimize(bean, expectedResult);
         testSerializeDeserializePrettified(bean, expectedResult);
+        testReconstructFromGetXMLStreamReader(bean, expectedResult);
         
         try {
             Class.forName("helper." + bean.getClass().getName());
@@ -312,6 +312,7 @@
         testSerializeDeserializeUsingMTOM(helperModeBean, helperModeExpectedResult, false);
         testSerializeDeserializeUsingMTOMWithoutOptimize(helperModeBean, helperModeExpectedResult);
         testSerializeDeserializePrettified(helperModeBean, helperModeExpectedResult);
+        testReconstructFromGetXMLStreamReader(helperModeBean, helperModeExpectedResult);
     }
     
     // Deserialization approach 1: use an XMLStreamReader produced by the StAX parser.
@@ -395,6 +396,11 @@
                 StAXUtils.createXMLStreamReader(new ByteArrayInputStream(baos.toByteArray()))));
     }
     
+    private static void testReconstructFromGetXMLStreamReader(Object bean, Object expectedResult) throws Exception {
+        OMElement omElement = ADBBeanUtil.getOMElement(bean);
+        assertBeanEquals(expectedResult, ADBBeanUtil.parse(bean.getClass(), omElement.getXMLStreamReader()));
+    }
+    
     /**
      * Assert that serializing the given bean should result in an {@link ADBException}.
      *