You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by sa...@apache.org on 2011/07/22 20:04:26 UTC

svn commit: r1149674 - in /axis/axis2/java/core/trunk/modules: adb/src/org/apache/axis2/databinding/typemapping/ adb/src/org/apache/axis2/databinding/utils/ adb/src/org/apache/axis2/rpc/receivers/ adb/test/org/apache/axis2/databinding/utils/ integratio...

Author: sagara
Date: Fri Jul 22 18:04:23 2011
New Revision: 1149674

URL: http://svn.apache.org/viewvc?rev=1149674&view=rev
Log:
Fixed AXIS2-5090  - This fix address following areas. 

ADB support for java Collection and schema generation. 
ADB support for complex structures such as Map of List or List of Map and nested scenarios.
Support for multinational arrays of object types.

Modified:
    axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java
    axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
    axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/Constants.java
    axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/MultirefHelper.java
    axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java
    axis/axis2/java/core/trunk/modules/adb/test/org/apache/axis2/databinding/utils/BeanUtilTest.java
    axis/axis2/java/core/trunk/modules/integration/test-resources/generics/generics.wsdl
    axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/generics/GenericServiceTest.java
    axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/Company.java
    axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java
    axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/RPCServiceClass.java
    axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
    axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java

Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java?rev=1149674&r1=1149673&r2=1149674&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java (original)
+++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java Fri Jul 22 18:04:23 2011
@@ -221,6 +221,9 @@ public class SimpleTypeMapper {
     }
 
     public static boolean isSimpleType(Object obj) {
+    	if(obj == null){
+    		return false;
+    	}
         String objClassName = obj.getClass().getName();
         return obj instanceof Calendar || obj instanceof Date || isSimpleType(objClassName);
     }
@@ -354,8 +357,11 @@ public class SimpleTypeMapper {
 	 * @param obj the Class type of particular object.
 	 * @return true, if is object array
 	 */
-	public static boolean isObjectArray(Class obj) {
-		if (obj.getComponentType().getName().equals(Object.class.getName())) {
+	public static boolean isObjectArray(Class obj) {		
+		if (obj != null
+				&& obj.getComponentType() != null
+				&& obj.getComponentType().getName()
+						.equals(Object.class.getName())) {
 			return true;
 		}
 		return false;
@@ -395,4 +401,21 @@ public class SimpleTypeMapper {
 		return java.util.Map.class.isAssignableFrom(classType);
 	}
 
+	/**
+	 * Checks weather passed parameter class is a multidimensional object array.
+	 *
+	 * @param type the type
+	 * @return true, if is multidimensional object array
+	 */
+	public static boolean isMultidimensionalObjectArray(Class type) {
+		Class compType = type.getComponentType();
+		if (compType == null) {
+			return false;
+		} else if (isObjectArray(compType)) {
+			return true;
+		} else {
+			return isMultidimensionalObjectArray(compType);
+		}
+	}
+
 }

Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java?rev=1149674&r1=1149673&r2=1149674&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java (original)
+++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java Fri Jul 22 18:04:23 2011
@@ -33,10 +33,21 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Comparator;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Iterator;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
+import java.util.NavigableSet;
+import java.util.Queue;
+import java.util.Set;
+import java.util.SortedSet;
 import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.concurrent.BlockingDeque;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingDeque;
+import java.util.concurrent.LinkedBlockingQueue;
 
 import javax.activation.DataHandler;
 import javax.xml.namespace.QName;
@@ -156,7 +167,7 @@ public class BeanUtil {
                                         beanObject.getClass().getPackage().getName());
                 }
 
-                elemntNameSpace = new QName(qNamefortheType.getNamespaceURI(), "elementName");
+                elemntNameSpace = new QName(qNamefortheType.getNamespaceURI(), "elementName", qNamefortheType.getPrefix());
             }
             AxisService axisService = null;
             if (MessageContext.getCurrentMessageContext() != null) {
@@ -239,8 +250,39 @@ public class BeanUtil {
                         if (value != null) {
                             for (Object o : (Object[]) value) {
                                 addTypeQname(elemntNameSpace, propertyQnameValueList,
-                                             property, beanName, processingDocLitBare);
-                                propertyQnameValueList.add(o);
+                                             property, beanName, processingDocLitBare);   
+                                QName propertyQName = new QName(elemntNameSpace.getNamespaceURI(),
+        								propertyName,
+        								elemntNameSpace.getPrefix());                              
+                                
+								if (SimpleTypeMapper
+										.isObjectArray(o.getClass())
+										|| SimpleTypeMapper
+												.isMultidimensionalObjectArray(o
+														.getClass())) {
+									/**
+            						 * If it is a Object[] we need to add instance type
+            						 * attributes to the response message.
+            						 * Copied from ADBXMLStreamReaderImpl. 
+            						 * For inner Arrary Complex types we use the special local name array - "array"
+            						 */
+            						QName itemName = new QName(elemntNameSpace.getNamespaceURI(),
+            								Constants.INNTER_ARRARY_COMPLEX_TYPE_NAME,
+            								elemntNameSpace.getPrefix());            						
+    								propertyQnameValueList.add(getOMElement(propertyQName , (Object[]) o,
+            								itemName, qualified, typeTable));                                	
+                                } else {
+                                	if(SimpleTypeMapper.isObjectArray(value.getClass())){
+                                		OMFactory fac = OMAbstractFactory.getOMFactory();
+                                    	OMElement element = fac.createOMElement(propertyQName);
+                                    	element.addChild(fac.createOMText(SimpleTypeMapper.getStringValue(o)));  
+                                    	addInstanceTypeAttribute(fac, element, o, typeTable);
+                                    	propertyQnameValueList.add(element);
+                                	} else {
+                                		propertyQnameValueList.add(o);                                 		
+                                	}                                	
+                                }
+                               
                             }
                         } else {
                             addTypeQname(elemntNameSpace, propertyQnameValueList, property,
@@ -248,30 +290,54 @@ public class BeanUtil {
                             propertyQnameValueList.add(value);
                         }
                     }
-                } else if (SimpleTypeMapper.isCollection(ptype)) {
-                    Collection<?> objList = (Collection<?>) value;
-                    if (objList != null && objList.size() > 0) {
-                        //this was given error , when the array.size = 0
-                        // and if the array contain simple type , then the ADBPullParser asked
-                        // PullParser from That simpel type
-                        for (Object o : objList) {
-                            if (SimpleTypeMapper.isSimpleType(o)) {
-                                addTypeQname(elemntNameSpace, propertyQnameValueList,
-                                             property, beanName, processingDocLitBare);
-                                propertyQnameValueList.add(o);
-                            } else {
-                                addTypeQname(elemntNameSpace, propertyQnameValueList,
-                                             property, beanName, processingDocLitBare);
-                                propertyQnameValueList.add(o);
-                            }
-                        }
-
+                } else  if (SimpleTypeMapper.isCollection(ptype)) { 
+                    if (typeTable != null) {
+                	OMFactory fac = OMAbstractFactory.getOMFactory();					
+			QName qNamefortheType = null;					
+			qNamefortheType = (QName) typeTable
+				.getComplexSchemaMap().get(getClassName(beanClass));					
+			Type genericType = property.getReadMethod().getGenericReturnType();
+			OMElement collection = BeanUtil.getCollectionElement(
+					fac, genericType,
+					(Collection) value, propertyName,null,
+					qNamefortheType,typeTable,
+					qualified);					
+//			addTypeQname(elemntNameSpace, propertyQnameValueList,
+//					property, beanName, processingDocLitBare);
+			Iterator childItr = collection.getChildren();
+			while(childItr.hasNext()){						
+				addTypeQname(elemntNameSpace, propertyQnameValueList,
+						property, beanName, processingDocLitBare);
+				propertyQnameValueList.add(childItr.next());						
+			}	
+                	
                     } else {
-                        addTypeQname(elemntNameSpace, propertyQnameValueList, property,
-                                     beanName, processingDocLitBare);
-                        propertyQnameValueList.add(value);
+                	 Collection<?> objList = (Collection<?>) value;
+                         if (objList != null && objList.size() > 0) {
+                             //this was given error , when the array.size = 0
+                             // and if the array contain simple type , then the ADBPullParser asked
+                             // PullParser from That simpel type
+                             for (Object o : objList) {
+                                 if (SimpleTypeMapper.isSimpleType(o)) {
+                                     addTypeQname(elemntNameSpace, propertyQnameValueList,
+                                                  property, beanName, processingDocLitBare);
+                                     propertyQnameValueList.add(o);
+                                 } else {
+                                     addTypeQname(elemntNameSpace, propertyQnameValueList,
+                                                  property, beanName, processingDocLitBare);
+                                     propertyQnameValueList.add(o);
+                                 }
+                             }
+
+                         } else {
+                             addTypeQname(elemntNameSpace, propertyQnameValueList, property,
+                                          beanName, processingDocLitBare);
+                             propertyQnameValueList.add(value);
+                         }
                     }
-				} else if (SimpleTypeMapper.isMap(ptype)) {
+                          
+									
+                } else if (SimpleTypeMapper.isMap(ptype)) {
 					OMFactory fac = OMAbstractFactory.getOMFactory();
 					QName qNamefortheType = (QName) typeTable
 							.getComplexSchemaMap().get(getClassName(beanClass));
@@ -526,8 +592,9 @@ public class BeanUtil {
                                 partObj = SimpleTypeMapper.getHashSet((OMElement)
                                         parts.getParent(), prty.getName());
                             } else if (SimpleTypeMapper.isCollection(parameters)) {
-                                partObj = SimpleTypeMapper.getArrayList((OMElement)
-                                        parts.getParent(), prty.getName());
+                            	Type type = prty.getReadMethod().getGenericReturnType();
+                            	partObj = processGenericCollection(parts, type, null, objectSupplier);  
+
                             } else if (SimpleTypeMapper.isDataHandler(parameters)) {
                                 partObj = SimpleTypeMapper.getDataHandler(parts);
                             } else if (parameters.isArray()) {
@@ -732,8 +799,16 @@ public class BeanUtil {
             if (genericParameterTypes != null) {
                 genericType = genericParameterTypes[count];
             }
-            omElement = processElement(classType, omElement, helper, parts,
-                                       currentLocalName, retObjs, count, objectSupplier, genericType);
+            /*
+             * In bare invocation "parameterNames" comes as null value.
+             */
+            boolean bare = false;
+            if(parameterNames == null){
+            	bare = true;            	
+            }
+           
+			omElement = processElement(classType, omElement, helper, parts,
+                                       currentLocalName, retObjs, count, objectSupplier, genericType, bare);
             while (omElement != null) {
                 count++;
                 // if the local part is not match. this means element is not present
@@ -777,14 +852,28 @@ public class BeanUtil {
         return retObjs;
     }
 
+	private static OMElement processElement(Class classType,
+			OMElement omElement, MultirefHelper helper, Iterator parts,
+			String currentLocalName, Object[] retObjs, int count,
+			ObjectSupplier objectSupplier, Type genericType) throws AxisFault {
+
+		return processElement(classType, omElement, helper, parts,
+				currentLocalName, retObjs, count, objectSupplier, genericType, false);
+
+	}
     private static OMElement processElement(Class classType, OMElement omElement,
                                             MultirefHelper helper, Iterator parts,
                                             String currentLocalName,
                                             Object[] retObjs,
                                             int count,
                                             ObjectSupplier objectSupplier,
-                                            Type genericType) throws AxisFault {
+                                            Type genericType, boolean bare) throws AxisFault {
         Object objValue;
+        boolean isRef = false;
+        OMAttribute omatribute = MultirefHelper.processRefAtt(omElement);	        
+        if (omatribute != null) {
+            isRef = true;
+        }	
         if (classType.isArray()) {
             boolean done = true;
             ArrayList<Object> valueList = new ArrayList<Object>();
@@ -821,29 +910,78 @@ public class BeanUtil {
             if (!done) {
                 return omElement;
             }
+            
+        } else if(SimpleTypeMapper.isCollection(classType) && ! isRef){
+        	if(bare){
+        		OMElement[] toReturn = new OMElement[1];
+        		parts = omElement.getChildren();
+            	retObjs[count] = processGenericCollection(omElement.getFirstElement(), toReturn, genericType, helper, objectSupplier, parts,bare);
+            	OMNode node = omElement.getNextOMSibling();
+            	while(node != null){
+            		if(OMElement.class.isAssignableFrom(node.getClass())){
+            			return (OMElement) node;
+            		} else {
+            			node = node.getNextOMSibling();
+            		}            		
+            	}      	
+            	            	 
+        	} else {
+        	OMElement[] toReturn = new OMElement[1];
+            	retObjs[count] = processGenericCollection(omElement, toReturn, genericType, helper, objectSupplier, parts,bare);
+            	 if (toReturn[0] != null) {        		
+                     return toReturn[0];
+                 }        		
+        	}        	
         } else {
             //handling refs
             retObjs[count] = processObject(omElement, classType, helper, false, objectSupplier, genericType);
+            
+            
         }
         return null;
     }
 
-    private static List<Object> processGenericsElement(Class classType, OMElement omElement,
+    private static Collection<Object> processGenericsElement(Type classType, OMElement omElement,
                                                MultirefHelper helper, Iterator parts,
                                                ObjectSupplier objectSupplier,
                                                Type genericType) throws AxisFault {
         Object objValue;
-        ArrayList<Object> valueList = new ArrayList<Object>();
+        Collection<Object> valueList = getCollectionInstance(genericType);
         while (parts.hasNext()) {
             objValue = parts.next();
+            Object o;
             if (objValue instanceof OMElement) {
                 omElement = (OMElement) objValue;
             } else {
                 continue;
             }
-            Object o = processObject(omElement, classType,
-                                     helper, true, objectSupplier, genericType);
-            valueList.add(o);
+			if (classType instanceof ParameterizedType) {
+				ParameterizedType parameterizedClassType = (ParameterizedType) classType;
+				if (Collection.class
+						.isAssignableFrom((Class<?>) parameterizedClassType
+								.getRawType())) {
+					o = processGenericCollection(omElement.getFirstElement(),
+							classType, helper, objectSupplier);
+				} else if (Map.class
+						.isAssignableFrom((Class<?>) parameterizedClassType
+								.getRawType())) {
+					o = processGenericsMapElement( 
+							parameterizedClassType.getActualTypeArguments(),
+							omElement, helper, omElement.getChildren(), objectSupplier,
+							parameterizedClassType);
+				} else {
+					o = processObject(omElement, (Class) classType,
+	                         helper, true, objectSupplier, genericType);
+				}
+    			   			
+    		} else {
+    			o = processObject(omElement, (Class) classType,
+                         helper, true, objectSupplier, genericType);
+    			
+    		}
+            
+			valueList.add(o);
+			
         }
         return valueList;
     }
@@ -877,7 +1015,7 @@ public class BeanUtil {
                 if (helper.getObject(ref) != null) {
                     return helper.getObject(ref);
                 } else {
-                    return helper.processRef(classType, ref, objectSupplier);
+                    return helper.processRef(classType, generictype, ref, objectSupplier);
                 }
             } else {
                 OMAttribute attribute = omElement.getAttribute(
@@ -893,14 +1031,8 @@ public class BeanUtil {
                         return getSimpleTypeObjectChecked(classType, omElement);
                     }
                 } else if (SimpleTypeMapper.isCollection(classType)) {
-                    if (generictype != null && (generictype instanceof ParameterizedType)) {
-                        ParameterizedType aType = (ParameterizedType) generictype;
-                        Type[] parameterArgTypes = aType.getActualTypeArguments();
-                        Type parameter = parameterArgTypes[0];
-                        Iterator parts = omElement.getChildElements();
-                        return processGenericsElement((Class) parameter, omElement, helper, parts, objectSupplier, generictype);
-                    }
-                    return SimpleTypeMapper.getArrayList(omElement);
+                	return processGenericCollection(omElement, generictype, null, objectSupplier); 
+
                 } else if (SimpleTypeMapper.isDataHandler(classType)) {
                     return SimpleTypeMapper.getDataHandler(omElement);
                     
@@ -977,10 +1109,26 @@ public class BeanUtil {
                     }
                 } else {
                     // this happens at the server side. this means it is an multidimentional array.
-                    objects.add(partName);
-                    objects.add(arg);
+					objects.add(partName);
+					if (SimpleTypeMapper.isObjectArray(arg.getClass())
+							|| SimpleTypeMapper
+									.isMultidimensionalObjectArray(arg
+											.getClass())) {
+						/**
+						 * If it is a Object[] we need to add instance type
+						 * attributes to the response message.
+						 * Copied from ADBXMLStreamReaderImpl. 
+						 * For inner Arrary Complex types we use the special local name array - "array"
+						 */
+						QName itemName = new QName(partName.getNamespaceURI(),
+								Constants.INNTER_ARRARY_COMPLEX_TYPE_NAME,
+								partName.getPrefix());
+						objects.add(getOMElement(partName, (Object[]) arg,
+								itemName, qualifed, typeTable));
+					} else {
+						objects.add(arg);
+					}
                 }
-
             } else {
                 if (SimpleTypeMapper.isSimpleType(arg)) { 
                 	OMElement element;
@@ -1234,7 +1382,7 @@ public class BeanUtil {
 	 * @return a instance of java.util.Map
 	 * @throws AxisFault the axis fault
 	 */
-	private static Map<Object,Object> processGenericsMapElement(Type[] parameterArgTypes,
+	public static Map<Object,Object> processGenericsMapElement(Type[] parameterArgTypes,
 			OMElement omElement, MultirefHelper helper, Iterator parts,
 			ObjectSupplier objectSupplier, Type genericType) throws AxisFault {
 		Object objValue;			
@@ -1315,22 +1463,44 @@ public class BeanUtil {
 			if (key != null) {
 				value = results.get(key);
 				List<Object> properties = new ArrayList<Object>();
+				QName keyName = new QName(ns.getNamespaceURI(),
+						org.apache.axis2.Constants.MAP_KEY_ELEMENT_NAME, ns
+								.getPrefix());
+				QName valueName = new QName(ns.getNamespaceURI(),
+						org.apache.axis2.Constants.MAP_VALUE_ELEMENT_NAME, ns
+								.getPrefix());				
 
-				key = getMapParameterElement(fac,
+				Object kValue = getMapParameterElement(fac,
 						org.apache.axis2.Constants.MAP_KEY_ELEMENT_NAME, key,
 						keyType, typeTable, ns, elementFormDefault);
-				properties.add(new QName(ns.getNamespaceURI(),
-						org.apache.axis2.Constants.MAP_KEY_ELEMENT_NAME, ns
-								.getPrefix()));
-				properties.add(key);
-
-				value = getMapParameterElement(fac,
+				
+				Object vValue = getMapParameterElement(fac,
 						org.apache.axis2.Constants.MAP_VALUE_ELEMENT_NAME,
 						value, valueType, typeTable, ns, elementFormDefault);
-				properties.add(new QName(ns.getNamespaceURI(),
-						org.apache.axis2.Constants.MAP_VALUE_ELEMENT_NAME, ns
-								.getPrefix()));
-				properties.add(value);
+				
+				if(Iterator.class.isAssignableFrom(kValue.getClass())){
+					Iterator valItr = (Iterator) kValue;
+					while (valItr.hasNext()) {
+						properties.add(keyName);
+						properties.add(valItr.next());						
+					}	
+				} else {
+					properties.add(keyName);
+					properties.add(kValue);
+				}			
+
+				
+				if(Iterator.class.isAssignableFrom(vValue.getClass())){
+					Iterator valItr = (Iterator) vValue;
+					while (valItr.hasNext()) {
+						properties.add(valueName);
+						properties.add(valItr.next());						
+					}			
+				} else {
+					properties.add(valueName);
+					properties.add(vValue);
+				}
+				
 
 				XMLStreamReader pullParser = new ADBXMLStreamReaderImpl(
 						new QName(
@@ -1371,9 +1541,11 @@ public class BeanUtil {
 						omElement, helper, omElement.getChildren(),
 						objectSupplier, paraType);
 			} else if (Collection.class	.isAssignableFrom((Class) 
-					((ParameterizedType) paraType).getRawType())) {
-				//TODO
-				return null;
+					((ParameterizedType) paraType).getRawType())) {				
+				return processGenericCollection(
+						omElement,
+						(ParameterizedType) paraType,
+						helper, objectSupplier);
 			} else {
 				// TODO - support for custom ParameterizedTypes
 				return null;
@@ -1438,6 +1610,13 @@ public class BeanUtil {
 			}
 			return omValue;
 			
+		} else if (SimpleTypeMapper.isCollection(value.getClass())) {			
+			QName elementQName = new QName(ns.getNamespaceURI(), elementName,
+					ns.getPrefix());
+			return getCollectionElement(fac, valueType, (Collection) value,
+					elementName, null, elementQName, typeTable,
+					elementFormDefault).getChildren();
+			
 		} else if (SimpleTypeMapper.isObjectType((Class) valueType)) {
 			OMElement omValue;
 			omValue = fac.createOMElement(elementName, ns);
@@ -1460,4 +1639,236 @@ public class BeanUtil {
 		}
 		return value;
 	}
+	
+	/**
+	 * Process generic collection.
+	 *
+	 * @param omElement the om element
+	 * @param generictype the generictype
+	 * @param helper the helper
+	 * @param objectSupplier the object supplier
+	 * @return the collection
+	 * @throws AxisFault the axis fault
+	 */
+	public static Collection<Object> processGenericCollection(OMElement omElement,
+			Type generictype, MultirefHelper helper,
+			ObjectSupplier objectSupplier) throws AxisFault {
+	QName partName = omElement.getQName();
+	Type parameter = Object.class;
+	if (generictype != null && (generictype instanceof ParameterizedType)) {
+	    ParameterizedType aType = (ParameterizedType) generictype;
+	    Type[] parameterArgTypes = aType.getActualTypeArguments();
+	    parameter = parameterArgTypes[0];
+	}
+	/*
+	 * Fix for AXIS2-5090. Use siblings with same QName instead of look for
+	 * children because list elements available on same level.
+	 */
+	Iterator parts = omElement.getParent().getChildrenWithName(partName);
+	return processGenericsElement(parameter, omElement, helper, parts,
+		objectSupplier, generictype);
+	}	
+	
+	/**
+	 * Process collection.
+	 *
+	 * @param omElement the om element
+	 * @param toReturn the to return
+	 * @param generictype the generictype
+	 * @param helper the helper
+	 * @param objectSupplier the object supplier
+	 * @param parts the parts
+	 * @param bare the bare
+	 * @return the collection
+	 * @throws AxisFault the axis fault
+	 */
+	public static Collection<Object> processGenericCollection(OMElement omElement,
+		OMElement[] toReturn, Type generictype, MultirefHelper helper,
+		ObjectSupplier objectSupplier, Iterator parts, boolean bare)
+		throws AxisFault {
+	    String currentLocalName = omElement.getLocalName();
+	    Type parameter = Object.class;
+	    List<OMElement> eleList = new ArrayList<OMElement>();
+	    // in 'Bare' style no need to add first element to the list.
+	    if (!bare) {
+		eleList.add(omElement);
+	    }
+
+	    if (generictype != null && (generictype instanceof ParameterizedType)) {
+		ParameterizedType aType = (ParameterizedType) generictype;
+		Type[] parameterArgTypes = aType.getActualTypeArguments();
+		parameter = parameterArgTypes[0];
+	    }
+
+	    while (parts.hasNext()) {
+		Object objValue = parts.next();
+		OMElement currElement;
+		if (objValue instanceof OMElement) {
+		    currElement = (OMElement) objValue;
+		} else {
+		    continue;
+		}
+		if (currentLocalName.equals(currElement.getLocalName())) {
+		    eleList.add(currElement);
+		} else {
+		    // This just a container to bring back un-proceeded OMEleemnt.
+		    toReturn[0] = currElement;
+		    break;
+		}
+	    }
+	    return processGenericsElement(parameter, omElement, helper,
+		    eleList.iterator(), objectSupplier, generictype);
+	}	
+
+	/**
+	 * Gets the collection element.
+	 *
+	 * @param fac the fac
+	 * @param type the type
+	 * @param results the results
+	 * @param name the name
+	 * @param innerName the inner name
+	 * @param elementQName the element q name
+	 * @param typeTable the type table
+	 * @param elementFormDefault the element form default
+	 * @return the collection element
+	 */
+	public static OMElement getCollectionElement(OMFactory fac, Type type,
+		Collection results, String name, String innerName,
+		QName elementQName, TypeTable typeTable, boolean elementFormDefault) {
+
+	    String elementName = (innerName == null) ? name : innerName;
+	    Iterator<Object> itr = results.iterator();
+	    List<Object> properties = new ArrayList<Object>();
+	    OMNamespace ns = fac.createOMNamespace(elementQName.getNamespaceURI(),
+		    elementQName.getPrefix());
+	    Type valueType = Object.class;
+	    if (type instanceof ParameterizedType) {
+		ParameterizedType aType = (ParameterizedType) type;
+		Type[] parameterArgTypes = aType.getActualTypeArguments();
+		valueType = parameterArgTypes[0];
+	    }
+
+	    while (itr.hasNext()) {
+		Object value = itr.next();
+		if (value != null) {
+		    value = getCollectionItemElement(fac, elementName, value,
+			    valueType, typeTable, ns, elementFormDefault);
+		    properties.add(new QName(ns.getNamespaceURI(), elementName, ns
+			    .getPrefix()));
+		    properties.add(value);
+		}
+	    }
+
+	    XMLStreamReader pullParser = new ADBXMLStreamReaderImpl(new QName(
+		    ns.getNamespaceURI(), elementQName.getLocalPart(),
+		    ns.getPrefix()), properties.toArray(), null, typeTable,
+		    elementFormDefault);
+
+	    StAXOMBuilder stAXOMBuilder = new StAXOMBuilder(
+		    OMAbstractFactory.getOMFactory(), new StreamWrapper(pullParser));
+	    return stAXOMBuilder.getDocumentElement();
+	}	
+
+	/**
+	 * Gets the collection item element.
+	 *
+	 * @param fac the fac
+	 * @param elementName the element name
+	 * @param value the value
+	 * @param valueType the value type
+	 * @param typeTable the type table
+	 * @param ns the ns
+	 * @param elementFormDefault the element form default
+	 * @return the collection item element
+	 */
+	private static Object getCollectionItemElement(OMFactory fac,
+		String elementName, Object value, Type valueType,
+		TypeTable typeTable, OMNamespace ns, boolean elementFormDefault) {
+	    if (SimpleTypeMapper.isMap(value.getClass())) {
+		List<OMElement> childList = getMapElement(fac, valueType,
+			(Map) value, typeTable, elementFormDefault);
+		OMElement omValue = fac.createOMElement(elementName,
+			ns.getNamespaceURI(), ns.getPrefix());
+		for (OMElement child : childList) {
+		    omValue.addChild(child);
+		}
+		return omValue;
+
+	    } else if (SimpleTypeMapper.isCollection(value.getClass())) {
+		return getCollectionElement(
+			fac,
+			valueType,
+			(Collection) value,
+			elementName,
+			Constants.INNTER_ARRARY_COMPLEX_TYPE_NAME,
+			new QName(ns.getNamespaceURI(), elementName, ns.getPrefix()),
+			typeTable, elementFormDefault);
+	    } else if (SimpleTypeMapper.isObjectType((Class) valueType)) {
+		OMElement omValue;
+		omValue = fac.createOMElement(elementName, ns);
+		if (SimpleTypeMapper.isSimpleType(value)) {
+		    omValue.addChild(fac.createOMText(SimpleTypeMapper
+			    .getStringValue(value)));
+		} else {
+		    QName name = new QName(ns.getNamespaceURI(), elementName,
+			    ns.getPrefix());
+		    XMLStreamReader xr = BeanUtil.getPullParser(value, name,
+			    typeTable, true, false);
+		    OMXMLParserWrapper stAXOMBuilder = OMXMLBuilderFactory
+		    .createStAXOMBuilder(OMAbstractFactory.getOMFactory(),
+			    new StreamWrapper(xr));
+		    omValue = stAXOMBuilder.getDocumentElement();
+
+		}
+		addInstanceTypeAttribute(fac, omValue, value, typeTable);
+		return omValue;
+	    }
+	    return value;
+	}
+	
+	/**
+	 * Gets the collection instance object according to the genericType passed.
+	 *
+	 * @param genericType the generic type
+	 * @return the collection instance
+	 */
+	private static Collection<Object> getCollectionInstance(Type genericType) {
+	    Class rowType;
+	    if (genericType instanceof ParameterizedType) {
+		rowType = (Class) ((ParameterizedType) genericType).getRawType();
+	    } else {
+		rowType = (Class) genericType;
+	    }
+
+	    if (Collection.class.getName().equals(rowType.getName())
+		    || List.class.getName().equals(rowType.getName())) {
+		return new ArrayList<Object>();
+
+	    } else if (Set.class.getName().equals(rowType.getName())) {
+		return new HashSet<Object>();
+
+	    } else if (Queue.class.getName().equals(rowType.getName())) {
+		return new LinkedList<Object>();
+
+	    } else if (BlockingDeque.class.getName().equals(rowType.getName())) {
+		return new LinkedBlockingDeque<Object>();
+
+	    } else if (BlockingQueue.class.getName().equals(rowType.getName())) {
+		return new LinkedBlockingQueue<Object>();
+
+	    } else if (NavigableSet.class.getName().equals(rowType.getName())
+		    || SortedSet.class.getName().equals(rowType.getName())) {
+		return new TreeSet<Object>();
+
+	    } else {
+		try {
+		    return (Collection<Object>) rowType.newInstance();
+		} catch (Exception e) {
+		    return new ArrayList<Object>();
+		}
+	    }
+	}
+	
+
 }

Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/Constants.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/Constants.java?rev=1149674&r1=1149673&r2=1149674&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/Constants.java (original)
+++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/Constants.java Fri Jul 22 18:04:23 2011
@@ -32,6 +32,9 @@ public interface Constants {
     static String XSI_TYPE_ATTRIBUTE = "type";
     static String DEFAULT_XSI_NAMESPACE_PREFIX = "xsi";
     static String DEFAULT_XSD_NAMESPACE_PREFIX = "xs";
+    
+    public static String INNTER_ARRARY_COMPLEX_TYPE_NAME = "array";
+    public static String RETURN_WRAPPER = "return";
 
     static Object OM_ATTRIBUTE_KEY = new OMAttribKey();
     static Object OM_ELEMENT_KEY = new OMElementKey();

Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/MultirefHelper.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/MultirefHelper.java?rev=1149674&r1=1149673&r2=1149674&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/MultirefHelper.java (original)
+++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/MultirefHelper.java Fri Jul 22 18:04:23 2011
@@ -33,6 +33,8 @@ import org.apache.axis2.databinding.type
 import org.apache.axis2.engine.ObjectSupplier;
 
 import javax.xml.namespace.QName;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
@@ -106,7 +108,11 @@ public class MultirefHelper {
         return new StAXOMBuilder(ele.getXMLStreamReader()).getDocumentElement();
     }
 
-    public Object processRef(Class javatype, String id, ObjectSupplier objectSupplier)
+    public Object processRef(Class javatype, String id,
+	    ObjectSupplier objectSupplier) throws AxisFault {
+	return processRef(javatype, null, id, objectSupplier);
+    }
+    public Object processRef(Class javatype, Type generictype, String id, ObjectSupplier objectSupplier)
             throws AxisFault {
         if (!filledTable) {
             readallChildElements();
@@ -128,10 +134,20 @@ public class MultirefHelper {
                 Object valObj = SimpleTypeMapper.getSimpleTypeObject(javatype, val);
                 objectmap.put(id, valObj);
                 return valObj;
-            } else if (SimpleTypeMapper.isCollection(javatype)) {
-                Object valobj = SimpleTypeMapper.getArrayList(val);
-                objectmap.put(id, valobj);
-                return valobj;
+            } else if (generictype != null
+        	    && SimpleTypeMapper.isCollection(javatype)) {
+        	return BeanUtil.processGenericCollection(val.getFirstElement(),
+        		generictype, this, objectSupplier);
+            } else if (generictype != null
+        	    && SimpleTypeMapper.isMap(javatype)) {
+        	Type[] parameterArgTypes = {Object.class, Object.class};
+        	if (generictype instanceof ParameterizedType) {
+        	    ParameterizedType aType = (ParameterizedType) generictype;
+        	    parameterArgTypes = aType.getActualTypeArguments();        	     
+        	}                                   
+		return BeanUtil.processGenericsMapElement(parameterArgTypes,
+			val.getFirstElement(), this, val.getChildren(),
+			objectSupplier, generictype);
             } else {
                 Object obj = BeanUtil.deserialize(javatype, val, this, objectSupplier);
                 objectmap.put(id, obj);

Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java?rev=1149674&r1=1149673&r2=1149674&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java (original)
+++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/rpc/receivers/RPCUtil.java Fri Jul 22 18:04:23 2011
@@ -32,6 +32,7 @@ import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.databinding.typemapping.SimpleTypeMapper;
 import org.apache.axis2.databinding.utils.BeanUtil;
+import org.apache.axis2.databinding.utils.Constants;
 import org.apache.axis2.databinding.utils.reader.NullXMLStreamReader;
 import org.apache.axis2.description.AxisMessage;
 import org.apache.axis2.description.AxisService;
@@ -45,6 +46,8 @@ import javax.xml.stream.XMLStreamReader;
 import java.lang.reflect.Array;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
@@ -52,8 +55,7 @@ import java.util.Map;
 
 public class RPCUtil {
 
-    private static String RETURN_WRAPPER = "return";
-
+    
     public static void processResponse(SOAPFactory fac, Object resObject,
                                        OMElement bodyContent,
                                        OMNamespace ns,
@@ -69,10 +71,10 @@ public class RPCUtil {
                         method.getName() + "Response", ns);
                 OMElement resWrapper;
                 if (qualified) {
-                    resWrapper = fac.createOMElement(RETURN_WRAPPER, ns.getNamespaceURI(),
+                    resWrapper = fac.createOMElement(Constants.RETURN_WRAPPER, ns.getNamespaceURI(),
                             ns.getPrefix());
                 } else {
-                    resWrapper = fac.createOMElement(RETURN_WRAPPER, null);
+                    resWrapper = fac.createOMElement(Constants.RETURN_WRAPPER, null);
                 }
                 resWrapper.addChild(result);
                 bodyContent.addChild(resWrapper);
@@ -81,9 +83,9 @@ public class RPCUtil {
 				bodyContent = fac.createOMElement(method.getName() + "Response", ns);
 				OMElement child;
 				if (qualified) {
-					child = fac.createOMElement(RETURN_WRAPPER, ns);
+					child = fac.createOMElement(Constants.RETURN_WRAPPER, ns);
 				} else {
-					child = fac.createOMElement(RETURN_WRAPPER, null);
+					child = fac.createOMElement(Constants.RETURN_WRAPPER, null);
 				}
 				child.addChild(doc);
 				bodyContent.addChild(child);	
@@ -92,9 +94,9 @@ public class RPCUtil {
                         method.getName() + "Response", ns);
                 OMElement child;
                 if (qualified) {
-                    child = fac.createOMElement(RETURN_WRAPPER, ns);
+                    child = fac.createOMElement(Constants.RETURN_WRAPPER, ns);
                 } else {
-                    child = fac.createOMElement(RETURN_WRAPPER, null);
+                    child = fac.createOMElement(Constants.RETURN_WRAPPER, null);
                 }
                 child.addChild(fac.createOMText(child, SimpleTypeMapper.getStringValue(resObject)));
                 addInstanceTypeInfo(fac, child, method, resObject, typeTable);               
@@ -105,9 +107,9 @@ public class RPCUtil {
                 // Java Beans
                 QName returnWrapper;
                 if (qualified) {
-                    returnWrapper = new QName(ns.getNamespaceURI(), RETURN_WRAPPER, ns.getPrefix());
+                    returnWrapper = new QName(ns.getNamespaceURI(), Constants.RETURN_WRAPPER, ns.getPrefix());
                 } else {
-                    returnWrapper = new QName(RETURN_WRAPPER);
+                    returnWrapper = new QName(Constants.RETURN_WRAPPER);
                 }
                 XMLStreamReader xr = BeanUtil.getPullParser(resObject,
                         returnWrapper, typeTable, qualified, false);
@@ -250,13 +252,13 @@ public class RPCUtil {
         if (qualified) {
             return BeanUtil.getOMElement(resname, objs,
                     new QName(resname.getNamespaceURI(),
-                            RETURN_WRAPPER,
+                	    Constants.RETURN_WRAPPER,
                             resname.getPrefix()),
                     qualified,
                     typeTable);
         } else {
             return BeanUtil.getOMElement(resname, objs,
-                    new QName(RETURN_WRAPPER), qualified,
+                    new QName(Constants.RETURN_WRAPPER), qualified,
                     typeTable);
         }
     }
@@ -308,24 +310,17 @@ public class RPCUtil {
                     envelope.getBody().addChild(bodyChild);
                 } else {
                     if (SimpleTypeMapper.isCollection(resObject.getClass())) {
-                        Collection collection = (Collection) resObject;
-                        int size = collection.size();
-                        Object values[] = new Object[size];
-                        int count = 0;
-                        for (Object aCollection : collection) {
-                            values[count] = aCollection;
-                            count++;
-
-                        }
-                        QName resName = new QName(elementQName.getNamespaceURI(),
-                                partName,
-                                elementQName.getPrefix());
-                        OMElement bodyChild = RPCUtil.getResponseElement(resName,
-                                values,
-                                service.isElementFormDefault(),
-                                service.getTypeTable());
-                        envelope.getBody().addChild(bodyChild);
-                        
+                    	QName resName = new QName(
+								elementQName.getNamespaceURI(),
+								method.getName() + "Response",
+								elementQName.getPrefix());
+						OMElement bodyChild = BeanUtil.getCollectionElement(
+								fac, method.getGenericReturnType(),
+								(Collection) resObject, Constants.RETURN_WRAPPER,null,
+								resName, service.getTypeTable(),
+								service.isElementFormDefault());
+						envelope.getBody().addChild(bodyChild);
+						
 					} else if (SimpleTypeMapper.isMap(resObject.getClass())) {
 						OMElement resElemt = fac.createOMElement(
 								partName, ns);
@@ -428,10 +423,10 @@ public class RPCUtil {
             QName resName;
             if (service.isElementFormDefault()) {
                 resName = new QName(service.getSchemaTargetNamespace(),
-                        RETURN_WRAPPER,
+                	Constants.RETURN_WRAPPER,
                         service.getSchemaTargetNamespacePrefix());
             } else {
-                resName = new QName(RETURN_WRAPPER);
+                resName = new QName(Constants.RETURN_WRAPPER);
             }
             XMLStreamReader xr = new NullXMLStreamReader(resName);
             StreamWrapper parser = new StreamWrapper(xr);
@@ -477,32 +472,25 @@ public class RPCUtil {
                             service.getTypeTable());
                     envelope.getBody().addChild(bodyChild);
                 } else {
-                    if (SimpleTypeMapper.isCollection(resObject.getClass())) {
-                        Collection collection = (Collection) resObject;
-                        int size = collection.size();
-                        Object values[] = new Object[size];
-                        int count = 0;
-                        for (Object aCollection : collection) {
-                            values[count] = aCollection;
-                            count++;
-
-                        }
-                        QName resName = new QName(elementQName.getNamespaceURI(),
-                                method.getName() + "Response",
-                                elementQName.getPrefix());
-                        OMElement bodyChild = RPCUtil.getResponseElement(resName,
-                                values,
-                                service.isElementFormDefault(),
-                                service.getTypeTable());
-                        envelope.getBody().addChild(bodyChild);
+                    if (SimpleTypeMapper.isCollection(resObject.getClass())) {                       
+						QName resName = new QName(
+								elementQName.getNamespaceURI(),
+								method.getName() + "Response",
+								elementQName.getPrefix());
+						OMElement bodyChild = BeanUtil.getCollectionElement(
+								fac, method.getGenericReturnType(),
+								(Collection) resObject, Constants.RETURN_WRAPPER,null,
+								resName, service.getTypeTable(),
+								service.isElementFormDefault());
+						envelope.getBody().addChild(bodyChild);
                     } else if (SimpleTypeMapper.isMap(resObject.getClass())){
                     	 OMElement resElemt = fac.createOMElement(method.getName() + "Response", ns);
                     	 List<OMElement> omList = BeanUtil.getMapElement(fac,method.getGenericReturnType(), (Map) resObject,service.getTypeTable(),service.isElementFormDefault());
                          OMElement returnElement;
                          if (service.isElementFormDefault()) {
-                             returnElement = fac.createOMElement(RETURN_WRAPPER, ns);
+                             returnElement = fac.createOMElement(Constants.RETURN_WRAPPER, ns);
                          } else {
-                             returnElement = fac.createOMElement(RETURN_WRAPPER, null);
+                             returnElement = fac.createOMElement(Constants.RETURN_WRAPPER, null);
                          }
                          Iterator<OMElement> omItr = omList.iterator();
                          while(omItr.hasNext()){
@@ -516,9 +504,9 @@ public class RPCUtil {
                         OMText text = fac.createOMText(resObject, true);
                         OMElement returnElement;
                         if (service.isElementFormDefault()) {
-                            returnElement = fac.createOMElement(RETURN_WRAPPER, ns);
+                            returnElement = fac.createOMElement(Constants.RETURN_WRAPPER, ns);
                         } else {
-                            returnElement = fac.createOMElement(RETURN_WRAPPER, null);
+                            returnElement = fac.createOMElement(Constants.RETURN_WRAPPER, null);
                         }
                         returnElement.addChild(text);
                         resElemt.addChild(returnElement);

Modified: axis/axis2/java/core/trunk/modules/adb/test/org/apache/axis2/databinding/utils/BeanUtilTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/test/org/apache/axis2/databinding/utils/BeanUtilTest.java?rev=1149674&r1=1149673&r2=1149674&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/adb/test/org/apache/axis2/databinding/utils/BeanUtilTest.java (original)
+++ axis/axis2/java/core/trunk/modules/adb/test/org/apache/axis2/databinding/utils/BeanUtilTest.java Fri Jul 22 18:04:23 2011
@@ -114,7 +114,7 @@ public class BeanUtilTest extends TestCa
         OMElement child = omFactory.createOMElement(new QName("child"), omElement);
         child.setText("World");
         
-        Object result = BeanUtil.processObject(omElement, List.class, new MultirefHelper(omElement), false, objectSupplier, null);
+        Object result = BeanUtil.processObject(omElement.getFirstElement(), List.class, new MultirefHelper(omElement), false, objectSupplier, List.class);
         assertTrue(result instanceof List);
         assertEquals(1, ((List) result).size());
     }

Modified: axis/axis2/java/core/trunk/modules/integration/test-resources/generics/generics.wsdl
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/integration/test-resources/generics/generics.wsdl?rev=1149674&r1=1149673&r2=1149674&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/integration/test-resources/generics/generics.wsdl (original)
+++ axis/axis2/java/core/trunk/modules/integration/test-resources/generics/generics.wsdl Fri Jul 22 18:04:23 2011
@@ -18,17 +18,10 @@
                 </xs:complexType>
             </xs:element>
             <xs:element name="processStringArray">
-                <xs:complexType>
-                    <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="values" nillable="true" type="ns:String"/>
-                    </xs:sequence>
+                 <xs:complexType>
+                    <xs:sequence/>
                 </xs:complexType>
-            </xs:element>
-            <xs:complexType name="String">
-                <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="array" nillable="true" type="xs:string"/>
-                </xs:sequence>
-            </xs:complexType>
+            </xs:element>           
             <xs:element name="processPersonList">
                 <xs:complexType>
                     <xs:sequence>

Modified: axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/generics/GenericServiceTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/generics/GenericServiceTest.java?rev=1149674&r1=1149673&r2=1149674&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/generics/GenericServiceTest.java (original)
+++ axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/generics/GenericServiceTest.java Fri Jul 22 18:04:23 2011
@@ -40,12 +40,13 @@ public class GenericServiceTest extends 
 
     public void testProcessStringList() throws AxisFault {
         RPCServiceClient sender = getRPCClient("GenericService", "processStringList");
-        ArrayList<StringArray> args = new ArrayList<StringArray>();
-        args.add(new StringArray());
-
-        Object[] value = sender.invokeBlocking(new QName("http://generics.axis2.apache.org", "processStringList", "req"), args.toArray(),
-                new Class[]{String.class});
-        assertEquals(value[0], "Test1");
+        ArrayList<String> args = new ArrayList<String>();       
+	args.add("Test1");
+	Object[] value = sender.invokeBlocking(
+		new QName("http://generics.axis2.apache.org",
+			"processStringList", "req"), args.toArray(),
+			new Class[] { String.class });
+	assertEquals(value[0], "Test1");
     }
 
     public void testGetStringList() throws AxisFault {
@@ -69,11 +70,14 @@ public class GenericServiceTest extends 
 
     public void testProcessPersonList() throws AxisFault {
         RPCServiceClient sender = getRPCClient("GenericService", "processPersonList");
-        ArrayList<PersonArray> args = new ArrayList<PersonArray>();
-        args.add(new PersonArray());
-
-        Object[] value = sender.invokeBlocking(new QName("http://generics.axis2.apache.org", "processPersonList", "req"), args.toArray(),
-                new Class[]{Person.class});
+        ArrayList<Person> args = new ArrayList<Person>();
+        Person p = new Person();
+        p.setAge(10);
+        args.add(p);
+        Object[] value = sender.invokeBlocking(
+        	new QName("http://generics.axis2.apache.org",
+        		"processPersonList", "req"), args.toArray(),
+        		new Class[] { Person.class });
         Person person = (Person) value[0];
         assertNotNull(person);
         assertEquals(person.getAge(), 10);

Modified: axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/Company.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/Company.java?rev=1149674&r1=1149673&r2=1149674&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/Company.java (original)
+++ axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/Company.java Fri Jul 22 18:04:23 2011
@@ -23,14 +23,14 @@ import java.util.ArrayList;
 
 public class Company {
 
-    private ArrayList persons;
+    private ArrayList<Person> persons;
     private String name;
 
-    public ArrayList getPersons() {
+    public ArrayList<Person> getPersons() {
         return persons;
     }
 
-    public void setPersons(ArrayList persons) {
+    public void setPersons(ArrayList<Person> persons) {
         this.persons = persons;
     }
 

Modified: axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java?rev=1149674&r1=1149673&r2=1149674&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java (original)
+++ axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java Fri Jul 22 18:04:23 2011
@@ -203,7 +203,7 @@ public class RPCCallTest extends RPCLoca
         Company com = new Company();
         com.setName("MyCompany");
 
-        ArrayList ps = new ArrayList();
+        ArrayList<Person> ps = new ArrayList<Person>();
 
         Person p1 = new Person();
         p1.setAge(10);
@@ -269,7 +269,7 @@ public class RPCCallTest extends RPCLoca
         Company com = new Company();
         com.setName("MyCompany");
 
-        ArrayList ps = new ArrayList();
+        ArrayList<Person> ps = new ArrayList<Person>();
 
         Person p1 = new Person();
         p1.setAge(10);
@@ -467,13 +467,12 @@ public class RPCCallTest extends RPCLoca
     }
 
     private OMElement getPayload() throws Exception {
-        String str = "<req:handleArrayList xmlns:req=\"http://rpc.axis2.apache.org\">\n" +
-                "  <arg0>\n" +
-                "    <item0>abc</item0>\n" +
-                "    <item0>def</item0>\n" +
-                "    <item0>ghi</item0>\n" +
-                "    <item0>klm</item0>\n" +
-                "  </arg0><arg1>10</arg1>" +
+        String str = "<req:handleArrayList xmlns:req=\"http://rpc.axis2.apache.org\">\n" +               
+                "    <item0 xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"  xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xsi:type=\"xsd:string\">abc</item0>\n" +
+                "    <item0 xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"  xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xsi:type=\"xsd:string\">def</item0>\n" +
+                "    <item0 xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"  xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xsi:type=\"xsd:string\">ghi</item0>\n" +
+                "    <item0 xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"  xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xsi:type=\"xsd:string\">klm</item0>\n" +
+                " <arg1 xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"  xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xsi:type=\"xsd:int\">10</arg1>" +
                 "</req:handleArrayList>";
         StAXOMBuilder staxOMBuilder;
         XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(

Modified: axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/RPCServiceClass.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/RPCServiceClass.java?rev=1149674&r1=1149673&r2=1149674&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/RPCServiceClass.java (original)
+++ axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/RPCServiceClass.java Fri Jul 22 18:04:23 2011
@@ -139,14 +139,11 @@ public class RPCServiceClass {
         return bean2 != null && bean != null;
     }
 
-    public String handleArrayList(ArrayList list, int b) {
-        String str = "";
+    public String handleArrayList(ArrayList<String> list, int b) {	
+        String str = "";      
         for (int i = 0; i < list.size(); i++) {
-            Object obj = list.get(i);
-            if (obj instanceof OMElement) {
-                OMElement omElement = (OMElement)obj;
-                str = str + omElement.getText();
-            }
+            String obj = list.get(i);           
+            str = str + obj;            
         }
         return str + b;
     }
@@ -170,12 +167,10 @@ public class RPCServiceClass {
 
 
     public Company echoCompany(Company com) throws AxisFault {
-        ArrayList pss = com.getPersons();
-        ArrayList tems = new ArrayList();
-        for (int i = 0; i < pss.size(); i++) {
-            OMElement omElement = (OMElement)pss.get(i);
-            Person p = (Person)BeanUtil
-                    .deserialize(Person.class, omElement, new DefaultObjectSupplier(), null);
+        ArrayList<Person> pss = com.getPersons();
+        ArrayList<Person> tems = new ArrayList<Person>();
+        for (int i = 0; i < pss.size(); i++) {  
+            Person p = pss.get(i);
             tems.add(p);
         }
         com.setPersons(tems);

Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=1149674&r1=1149673&r2=1149674&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java (original)
+++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Fri Jul 22 18:04:23 2011
@@ -400,9 +400,12 @@ public class DefaultSchemaGenerator impl
                     break;
                     
                 } else if(methodParameter != null && Map.class.isAssignableFrom(methodParameter)) {
-                	generateWrappedSchemaTypeForMap(sequence,genericParameterTypes[j], parameterName);                
-                }
-                else {
+                	generateWrappedSchemaTypeForMap(sequence, genericParameterTypes[j], parameterName);   
+                	
+                } else if(methodParameter != null && Collection.class.isAssignableFrom(methodParameter)){
+                	generateWrappedSchemaTypeForCollection(sequence, genericParameterTypes[j], parameterName); 
+                	
+                } else {
                     Type genericParameterType = genericParameterTypes[j];
                     Type genericType = null;
                     if(genericParameterType instanceof ParameterizedType){
@@ -440,6 +443,12 @@ public class DefaultSchemaGenerator impl
 					} else {
 						generateWrappedSchemaTypeForMap(sequence, returnType, returnName);
 					}                  	
+                } else if (Collection.class.isAssignableFrom(returnType)){
+					if (genericParameterType instanceof ParameterizedType) {						
+						generateWrappedSchemaTypeForCollection(sequence, genericParameterType, returnName);
+					} else {						
+						generateWrappedSchemaTypeForCollection(sequence, genericParameterType, returnName);
+					}                  	
                 } else if(genericParameterType instanceof ParameterizedType){
                     ParameterizedType aType = (ParameterizedType) genericParameterType;
                     Type[] parameterArgTypes = aType.getActualTypeArguments();
@@ -665,6 +674,14 @@ public class DefaultSchemaGenerator impl
                             Type[] fieldArgTypes = aType.getActualTypeArguments();
                             if(Map.class.isAssignableFrom((Class)((ParameterizedType)aType).getRawType())){
                             	generateWrappedSchemaTypeForMap(sequence, aType, propertyName);
+                            	
+			    }
+			    if (Collection.class
+				    .isAssignableFrom((Class) ((ParameterizedType) aType)
+					    .getRawType())) {     
+				
+				generateWrappedSchemaTypeForCollection(
+					sequence, aType, propertyName);
                             } else {
                             	try {
                                     generateSchemaforGenericFields(xmlSchema,
@@ -684,7 +701,15 @@ public class DefaultSchemaGenerator impl
                         } else {
                         	if(genericFieldType != null && Map.class.isAssignableFrom((Class)genericFieldType)){
                         		generateWrappedSchemaTypeForMap(sequence, genericFieldType, propertyName);
-                            } else {
+                        		
+			    }
+			    if (genericFieldType != null
+				    && Collection.class
+					    .isAssignableFrom((Class) genericFieldType)) {
+				generateWrappedSchemaTypeForCollection(
+					sequence, genericFieldType,
+					propertyName);
+			    } else {
                             	generateSchemaforFieldsandProperties(xmlSchema,
                                         sequence,
                                         property.getPropertyType(),
@@ -1703,7 +1728,7 @@ public class DefaultSchemaGenerator impl
 	 */
 	private void generateWrappedSchemaTypeForMap(XmlSchemaSequence sequence,
 			Type genericParameterType, String parameterName) throws Exception {
-		generateSchemaTypeForMap(sequence, genericParameterType, parameterName);
+		generateSchemaTypeForMap(sequence, genericParameterType, parameterName, false);
 	}
     
 	/**
@@ -1716,7 +1741,7 @@ public class DefaultSchemaGenerator impl
 	 * @throws Exception the exception
 	 */
 	protected QName generateSchemaTypeForMap(XmlSchemaSequence sequence,
-			Type genericParameterType, String parameterName) throws Exception {
+			Type genericParameterType, String parameterName, boolean isArrayType) throws Exception {
 		/*
 		 * In Doc/Lit Wrapped - sequence should not be null.
 		 * In Doc/lit Bare    - sequence should be null.
@@ -1781,6 +1806,11 @@ public class DefaultSchemaGenerator impl
 
 			XmlSchemaElement parameterElement = new XmlSchemaElement();
 			parameterElement.setName(parameterName);
+			if(isArrayType){
+				parameterElement.setMaxOccurs(Long.MAX_VALUE);
+				parameterElement.setMinOccurs(0);
+				parameterElement.setNillable(true);
+			}			
 			sequence.getItems().add(parameterElement);
 			parameterElement.setSchemaTypeName(parameterTypeName);
 			return parameterTypeName;
@@ -1796,7 +1826,7 @@ public class DefaultSchemaGenerator impl
 	 * @param elementName the element name
 	 * @throws Exception the exception
 	 */
-	private void generateSchemaTypeForMapParameter(
+	protected void generateSchemaTypeForMapParameter(
 			XmlSchemaSequence entrySequence, Type parameterType,
 			String elementName) throws Exception {
 		if (parameterType instanceof ParameterizedType) {
@@ -1809,7 +1839,7 @@ public class DefaultSchemaGenerator impl
 			} else if (Collection.class
 					.isAssignableFrom((Class) ((ParameterizedType) parameterType)
 							.getRawType())) {
-				// TODO - support for Collection and Arrays
+				generateSchemaForCollection(entrySequence, parameterType, elementName);
 			} else {
 				// TODO - support for custom ParameterizedTypes
 			}
@@ -1818,8 +1848,136 @@ public class DefaultSchemaGenerator impl
 					false);
 			}
 	}
+	
+	/**
+	 * Generate schema for collection.
+	 *
+	 * @param sequence the sequence
+	 * @param genericType the generic type
+	 * @param partName the part name
+	 * @return the q name
+	 * @throws Exception the exception
+	 */
+	protected QName generateSchemaForCollection(XmlSchemaSequence sequence,
+		Type genericType, String partName) throws Exception {
+	    
+	    if (genericType instanceof ParameterizedType) {
+		ParameterizedType parameterizedType = (ParameterizedType) genericType;
+		Type[] parameterizedTypes = parameterizedType
+		.getActualTypeArguments();
+		Type parameterType = parameterizedTypes[0];
+		Type innerParameterType = Object.class;
+
+		if (parameterType instanceof GenericArrayType) {
+		    log.debug("not supported");
+		    return null;
+		}
+
+		if (parameterType instanceof ParameterizedType) {
+		    ParameterizedType innerParameterizedType = (ParameterizedType) parameterType;
+		    Type[] innerParameterizedTypes = parameterizedType
+		    .getActualTypeArguments();
+		    innerParameterType = innerParameterizedTypes[0];
+		    XmlSchema xmlSchema = getXmlSchema(schemaTargetNameSpace);
+		    String simpleTypeName = getCollectionElementName(parameterType);
+
+		    if (xmlSchema.getTypeByName(simpleTypeName) == null) {
+			if (Collection.class
+				.isAssignableFrom((Class<?>) innerParameterizedType
+					.getRawType())) {
+			    XmlSchemaComplexType xmlSchemaComplexType = new XmlSchemaComplexType(
+				    xmlSchema);
+			    XmlSchemaSequence xmlSchemaSequence = new XmlSchemaSequence();
+			    xmlSchemaComplexType.setParticle(xmlSchemaSequence);
+			    generateWrappedSchemaTypeForCollection(
+				    xmlSchemaSequence, innerParameterizedType,
+			    "array");
+			    xmlSchemaComplexType.setName(simpleTypeName);
+			    xmlSchema.getItems().add(xmlSchemaComplexType);
+			    xmlSchema.getSchemaTypes().add(
+				    new QName(xmlSchema.getTargetNamespace(),
+					    simpleTypeName), xmlSchemaComplexType);
+
+			    addContentToMethodSchemaType(sequence,
+				    new QName(xmlSchema.getTargetNamespace(),
+					    simpleTypeName), partName, true);
+			    return new QName(xmlSchema.getTargetNamespace(),
+				    simpleTypeName);
+
+			} else if (Map.class
+				.isAssignableFrom((Class<?>) innerParameterizedType
+					.getRawType())) {
+			    return generateSchemaTypeForMap(sequence,
+				    innerParameterType, partName, true);
+
+			}
+		    } else {
+
+			addContentToMethodSchemaType(sequence,
+				new QName(xmlSchema.getTargetNamespace(),
+					simpleTypeName), partName, true);
+		    }
+
+		} else {
+		    return generateSchemaForType(sequence, parameterType, partName,
+			    true);
+		}
+	    } else {
+		return generateSchemaForType(sequence, genericType, partName, true);
+	    }
+	    return null;
+
+	}
+	
+	/**
+	 * Generate wrapped schema type for collection.
+	 *
+	 * @param sequence the sequence
+	 * @param genericType the generic type
+	 * @param partName the part name
+	 * @throws Exception the exception
+	 */
+	private void generateWrappedSchemaTypeForCollection(
+		XmlSchemaSequence sequence, Type genericType, String partName)
+	throws Exception {
+	    generateSchemaForCollection(sequence, genericType, partName);
+	}
+
     
 	/**
+	 * Gets the collection element name.
+	 *
+	 * @param genericType the generic type
+	 * @return the collection element name
+	 */
+	private String getCollectionElementName(Type genericType) {
+	    if (genericType instanceof ParameterizedType) {
+		ParameterizedType parameterizedType = (ParameterizedType) genericType;
+		if (Map.class.isAssignableFrom((Class<?>) parameterizedType
+			.getRawType())) {
+		    Type[] parameterizedArgs = parameterizedType
+		    .getActualTypeArguments();
+		    String first = getCollectionElementName(parameterizedArgs[0]);
+		    String second = getCollectionElementName(parameterizedArgs[1]);
+		    return "MapOf" + first + "And" + second;
+
+		} else if (Collection.class
+			.isAssignableFrom((Class<?>) parameterizedType.getRawType())) {
+		    Type[] parameterizedArgs = parameterizedType
+		    .getActualTypeArguments();
+		    return "ArrayOf"
+		    + getCollectionElementName(parameterizedArgs[0]);
+		} else {
+		    return getCollectionElementName(parameterizedType);
+		}
+
+	    } else {
+		return ((Class) genericType).getSimpleName();
+
+	    }
+
+	}
+	/**
 	 * Provides unique name for a Map.
 	 *
 	 * @return the string

Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java?rev=1149674&r1=1149673&r2=1149674&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java (original)
+++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java Fri Jul 22 18:04:23 2011
@@ -44,6 +44,7 @@ import java.lang.reflect.Modifier;
 import java.lang.reflect.Type;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.Map;
@@ -173,6 +174,19 @@ public class DocLitBareSchemaGenerator e
                         processedParameters.put(parameterName, jMethod);
                         if (methodParameter != null && Map.class.isAssignableFrom(methodParameter)){                        	
 							generateBareSchemaTypeForMap(parameterName, genericParameterTypes[0], null);
+							
+                        } else if (methodParameter != null
+                        	&& Collection.class
+                        	.isAssignableFrom(methodParameter)) {
+                            
+                            sequence = new XmlSchemaSequence();
+                            methodSchemaType = createSchemaTypeForMethodPart(methodName);
+                            methodSchemaType.setParticle(sequence);
+                            generateBareSchemaTypeForCollection(sequence,
+                        	    genericParameterTypes[0], parameterName,
+                        	    methodName);
+                            parameterName = methodName;
+
                         } else {
                         	generateSchemaForType(null, methodParameter, parameterName);                        	
                         }                        
@@ -188,17 +202,18 @@ public class DocLitBareSchemaGenerator e
             // for its return type
             Class<?> returnType = jMethod.getReturnType();
             Type genericReturnType = jMethod.getGenericReturnType();
+            String methodTypeName = jMethod.getName() + RESULT;
+            String returnName = "return";
 
             if (!"void".equals(jMethod.getReturnType().getName())) {
                 AxisMessage outMessage = axisOperation.getMessage(
                         WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
                 if (returnType.isArray()) {
                     methodSchemaType =
-                            createSchemaTypeForMethodPart(jMethod.getName() + RESULT);
+                            createSchemaTypeForMethodPart(methodTypeName);
                     sequence = new XmlSchemaSequence();
                     methodSchemaType.setParticle(sequence);
-                    WebResultAnnotation returnAnnon = JSR181Helper.INSTANCE.getWebResultAnnotation(jMethod);
-                    String returnName = "return";
+                    WebResultAnnotation returnAnnon = JSR181Helper.INSTANCE.getWebResultAnnotation(jMethod);                  
                     if (returnAnnon != null) {
                         returnName = returnAnnon.getName();
                         if (returnName != null && !"".equals(returnName)) {
@@ -212,17 +227,26 @@ public class DocLitBareSchemaGenerator e
                     }
                 } else {
                 	if (returnType != null && Map.class.isAssignableFrom(returnType)){                        	
-						generateBareSchemaTypeForMap(methodName + RESULT, genericReturnType, null);
-                    } else {
-                    	generateSchemaForType(null, returnType, methodName + RESULT);                    	
+						generateBareSchemaTypeForMap(methodTypeName, genericReturnType, null);
+						
+                	} else if (returnType != null
+                		&& Collection.class.isAssignableFrom(returnType)) {
+                	    sequence = new XmlSchemaSequence();
+                	    methodSchemaType = createSchemaTypeForMethodPart(methodTypeName);
+                	    methodSchemaType.setParticle(sequence);
+                	    generateBareSchemaTypeForCollection(sequence,
+                		    genericReturnType, returnName, methodName);
+
+                	} else {
+                    	generateSchemaForType(null, returnType, methodTypeName);                    	
                     }                    
                     outMessage.setWrapped(false);
                 }
-                outMessage.setElementQName(typeTable.getQNamefortheType(methodName + RESULT));
+                outMessage.setElementQName(typeTable.getQNamefortheType(methodTypeName));
                 outMessage.setName(methodName + "ResponseMessage");
-                outMessage.setPartName(methodName + RESULT);
+                outMessage.setPartName(methodTypeName);
                 service.addMessageElementQNameToOperationMapping(
-                        typeTable.getQNamefortheType(methodName + RESULT),
+                        typeTable.getQNamefortheType(methodTypeName),
                         axisOperation);
             }
             if (addToService) {
@@ -242,6 +266,11 @@ public class DocLitBareSchemaGenerator e
             return true;
         } else if (methodParameter != null && Map.class.isAssignableFrom(methodParameter)){                        	
 			generateBareSchemaTypeForMap(parameterName, genericParameterType, sequence);			
+        } else if (methodParameter != null
+        	&& Collection.class.isAssignableFrom(methodParameter)) {
+            generateBareSchemaTypeForCollection(sequence, genericParameterType,
+        	    parameterName, jMethod.getName());
+            
         } else {
             generateSchemaForType(sequence, methodParameter, parameterName);
         }
@@ -386,7 +415,7 @@ public class DocLitBareSchemaGenerator e
 			Type genericParameterType, XmlSchemaSequence sequence)
 			throws Exception {
 		QName schemaTypeName = generateSchemaTypeForMap(sequence,
-				genericParameterType, paraName);
+				genericParameterType, paraName, false);
 		if (sequence != null) {
 			return;
 		}
@@ -403,5 +432,21 @@ public class DocLitBareSchemaGenerator e
 		typeTable.addComplexSchema(paraName, elementName);
 
 	}
+	
+	/**
+	 * Generate bare schema type for collection.
+	 *
+	 * @param sequence the sequence
+	 * @param genericType the generic type
+	 * @param partName the part name
+	 * @param methodName the method name
+	 * @throws Exception the exception
+	 */
+	private void generateBareSchemaTypeForCollection(
+		XmlSchemaSequence sequence, Type genericType, String partName,
+		String methodName) throws Exception {
+	    QName schemaTypeName = generateSchemaForCollection(sequence,
+		    genericType, partName);
+	}
 
 }