You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sc...@apache.org on 2006/12/08 01:22:05 UTC

svn commit: r483756 - in /webservices/axis2/trunk/java/modules/jaxws: src/org/apache/axis2/jaxws/i18n/ src/org/apache/axis2/jaxws/marshaller/impl/alt/ src/org/apache/axis2/jaxws/util/ src/org/apache/axis2/jaxws/wrapper/impl/ test-resources/wsdl/ test/o...

Author: scheu
Date: Thu Dec  7 16:22:04 2006
New Revision: 483756

URL: http://svn.apache.org/viewvc?view=rev&rev=483756
Log:
AXIS2-1792
Contributor:Rich Scheuerle
Additional JAX-WS document/literal wrapped array testing

Added:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/util/ConvertUtils.java
Modified:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/i18n/resource.properties
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/MethodMarshallerUtils.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/wrapper/impl/PropertyInfo.java
    webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/gorilla_dlw.wsdl
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/GorillaDLWProxyTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/gorilla_dlw/GorillaProxyImpl.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/gorilla_dlw/META-INF/gorilla_dlw.wsdl
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/gorilla_dlw/sei/GorillaInterface.java

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/i18n/resource.properties
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/i18n/resource.properties?view=diff&rev=483756&r1=483755&r2=483756
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/i18n/resource.properties (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/i18n/resource.properties Thu Dec  7 16:22:04 2006
@@ -139,4 +139,5 @@
 SchemaReaderErr2=Circular Dependency Found in WSDL Schema Imports, Two Schemas are importing each other.
 XSDListNotSupported=An attempt was made to marshal or unmarshal an xsd:list with a component type that is a {0}.  This scenario is not supported for rpc/literal processing.  Please use document/literal processing
 dispatchBadDOMSource=An invalid DOMSource was encountered during Dispatch.  Please use a DOMSource that contains a Node.
-invalidPropValue=The value of property {0} was invalid.  {1} does not match expected type {2}.  
\ No newline at end of file
+convertProblem=An internal error occurred during JAX-WS marshalling. An object of type {0} cannot be converted into the destination type of {1}
+invalidPropValue=The value of property {0} was invalid.  {1} does not match expected type {2}.

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java?view=diff&rev=483756&r1=483755&r2=483756
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java Thu Dec  7 16:22:04 2006
@@ -34,6 +34,7 @@
 import org.apache.axis2.jaxws.description.OperationDescription;
 import org.apache.axis2.jaxws.description.OperationDescriptionJava;
 import org.apache.axis2.jaxws.description.ParameterDescription;
+import org.apache.axis2.jaxws.i18n.Messages;
 import org.apache.axis2.jaxws.marshaller.MethodMarshaller;
 import org.apache.axis2.jaxws.message.Block;
 import org.apache.axis2.jaxws.message.Message;
@@ -43,6 +44,7 @@
 import org.apache.axis2.jaxws.message.factory.JAXBBlockFactory;
 import org.apache.axis2.jaxws.message.factory.MessageFactory;
 import org.apache.axis2.jaxws.registry.FactoryRegistry;
+import org.apache.axis2.jaxws.util.ConvertUtils;
 import org.apache.axis2.jaxws.util.XMLRootElementUtil;
 import org.apache.axis2.jaxws.wrapper.JAXBWrapperTool;
 import org.apache.axis2.jaxws.wrapper.impl.JAXBWrapperToolImpl;
@@ -155,6 +157,14 @@
                 returnValue = null;
             } else if (isChildReturn) {
                 returnValue = objects[objects.length-1];
+                // returnValue may be incompatible with JAX-WS signature
+                if (ConvertUtils.isConvertable(returnValue, returnType)) {
+                    returnValue = ConvertUtils.convert(returnValue, returnType);
+                } else {
+                    String objectClass = (returnValue == null) ? "null" : returnValue.getClass().getName();
+                    throw ExceptionFactory.makeWebServiceException(
+                            Messages.getMessage("convertProblem", objectClass, returnType.getName()));
+                }
             } else {
                 returnValue = wrapperObject;
             }

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/MethodMarshallerUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/MethodMarshallerUtils.java?view=diff&rev=483756&r1=483755&r2=483756
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/MethodMarshallerUtils.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/MethodMarshallerUtils.java Thu Dec  7 16:22:04 2006
@@ -60,6 +60,7 @@
 import org.apache.axis2.jaxws.message.util.XMLFaultUtils;
 import org.apache.axis2.jaxws.registry.FactoryRegistry;
 import org.apache.axis2.jaxws.util.ClassUtils;
+import org.apache.axis2.jaxws.util.ConvertUtils;
 import org.apache.axis2.jaxws.util.JavaUtils;
 import org.apache.axis2.jaxws.util.XMLRootElementUtil;
 import org.apache.commons.logging.Log;
@@ -236,6 +237,19 @@
                 // The signature wants the object that is rendered as the type
                 value = XMLRootElementUtil.getTypeEnabledObject(value);
                 
+                // Now that we have the type, there may be a mismatch
+                // between the type (as defined by JAXB) and the formal
+                // parameter (as defined by JAXWS).  Frequently this occurs
+                // with respect to T[] versus List<T>.  
+                // Use the convert utility to silently do any conversions
+                if (ConvertUtils.isConvertable(value, pd.getParameterActualType())) {
+                    value = ConvertUtils.convert(value, pd.getParameterActualType());
+                } else {
+                    String objectClass = (value == null) ? "null" : value.getClass().getName();
+                    throw ExceptionFactory.makeWebServiceException(
+                            Messages.getMessage("convertProblem", objectClass, pd.getParameterActualType().getName()));
+                }
+                
                 // The signature may want a holder representation
                 if (pd.isHolderType()) {
                     args[i] = createHolder(pd.getParameterType(), value);
@@ -276,6 +290,19 @@
                 
                 // The signature wants the object that is rendered as the type
                 value = XMLRootElementUtil.getTypeEnabledObject(value);
+                
+                // Now that we have the type, there may be a mismatch
+                // between the type (as defined by JAXB) and the formal
+                // parameter (as defined by JAXWS).  Frequently this occurs
+                // with respect to T[] versus List<T>.  
+                // Use the convert utility to silently do any conversions
+                if (ConvertUtils.isConvertable(value, pd.getParameterActualType())) {
+                    value = ConvertUtils.convert(value, pd.getParameterActualType());
+                } else {
+                    String objectClass = (value == null) ? "null" : value.getClass().getName();
+                    throw ExceptionFactory.makeWebServiceException(
+                            Messages.getMessage("convertProblem", objectClass, pd.getParameterActualType().getName()));
+                }
                 
                 // TODO Assert that this ParameterDescriptor must represent
                 // an OUT or INOUT and must have a non-null holder object to 

Added: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/util/ConvertUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/util/ConvertUtils.java?view=auto&rev=483756
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/util/ConvertUtils.java (added)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/util/ConvertUtils.java Thu Dec  7 16:22:04 2006
@@ -0,0 +1,278 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ * Copyright 2006 International Business Machines Corp.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.axis2.jaxws.util;
+
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Provides utilities to convert an object into a different kind of Object.
+ * For example, convert a String[] into a List<String>
+ */
+public class ConvertUtils {
+
+    private static final Log log = LogFactory.getLog(ConvertUtils.class);
+    /**
+     * This method should return true if the convert method 
+     * will succeed.
+     * 
+     * Note that any changes to isConvertable() must also
+     * be accompanied by similar changes to convert()
+     * 
+     * @param obj source object or class
+     * @param dest destination class
+     * @return boolean true if convert(..) can convert obj to the destination class
+     */
+    public static boolean isConvertable(Object obj, Class dest)
+    {
+        Class src = null;
+        
+        if (obj != null) {
+            if (obj instanceof Class) {
+                src = (Class)obj;
+            } else {
+                src = obj.getClass();
+            }
+        }
+        
+        if (dest == null) {
+            return false;
+        }
+        
+        if (src == null) {
+            return true;
+        }
+        
+        // If we're directly assignable, we're good.
+        if (dest.isAssignableFrom(src)) {
+            return true;
+        }
+        
+        // If it's a wrapping conversion, we're good.
+        if (JavaUtils.getWrapperClass(src) == dest) {
+            return true;
+        }
+        if (JavaUtils.getWrapperClass(dest) == src) {
+            return true;
+        }
+        
+        // If it's List -> Array or vice versa, we're good.
+        if ((Collection.class.isAssignableFrom(src) || src.isArray()) &&
+                (Collection.class.isAssignableFrom(dest) || dest.isArray())) {
+            return true;
+        }
+        
+        // Allow mapping of HashMaps to Hashtables
+        if (src == HashMap.class && dest == Hashtable.class)
+            return true;
+        
+        // Allow mapping of Calendar to Date
+        if (Calendar.class.isAssignableFrom(src) && dest == Date.class) {
+            return true;
+        }
+        
+        if (src.isPrimitive()) {
+            return isConvertable(JavaUtils.getWrapperClass(src),dest);
+        }
+        
+        // If it's a MIME type mapping and we want a DataHandler,
+        // then we're good.
+        // REVIEW Do we want to support this
+        /*
+        if (dest.getName().equals("javax.activation.DataHandler")) {
+            String name = src.getName();
+            if (src == String.class
+                    || src == java.awt.Image.class
+                    || name.equals("javax.mail.internet.MimeMultipart")
+                    || name.equals("javax.xml.transform.Source"))
+                return true;
+        }
+        */
+
+        
+        return false;
+    }
+    
+    /** 
+     * Utility function to convert an Object to some desired Class.
+     *
+     * Normally this is used for T[] to List<T> processing.
+     * Other conversions are also done (i.e. HashMap <->Hashtable, etc.)
+     * 
+     * Use the isConvertable() method to determine if conversion is possible.
+     * Note that any changes to convert() must also
+     * be accompanied by similar changes to isConvertable()
+     *
+     * @param arg the array to convert
+     * @param destClass the actual class we want
+     * @return object of destClass if conversion possible, otherwise returns arg
+     */
+    public static Object convert(Object arg, Class destClass)
+    {
+        if (destClass == null) {
+            return arg;
+        }
+
+        if (arg != null && destClass.isAssignableFrom(arg.getClass())) {
+            return arg;
+        }
+
+        if (log.isDebugEnabled()) {
+            String clsName = "null";
+            if (arg != null) clsName = arg.getClass().getName();
+            log.debug("Converting an object of type " + clsName + " to an object of type " + 
+                    destClass.getName());
+        }
+
+
+        // Convert between Calendar and Date
+        if (arg instanceof Calendar && destClass == Date.class) {
+            return ((Calendar) arg).getTime();
+        }
+
+
+        // Convert between HashMap and Hashtable
+        if (arg instanceof HashMap && destClass == Hashtable.class) {
+            return new Hashtable((HashMap)arg);
+        }
+
+        // If the destination is an array and the source
+        // is a suitable component, return an array with 
+        // the single item.
+        /* REVIEW do we need to support atomic to array conversion ?
+        if (arg != null &&
+            destClass.isArray() &&
+            !destClass.getComponentType().equals(Object.class) &&
+            destClass.getComponentType().isAssignableFrom(arg.getClass())) {
+            Object array = 
+                Array.newInstance(destClass.getComponentType(), 1);
+            Array.set(array, 0, arg);
+            return array;
+        }
+        */
+
+        // Return if no conversion is available
+        if (!(arg instanceof Collection ||
+              (arg != null && arg.getClass().isArray()))) {
+            return arg;
+        }
+        
+        if (arg == null) {
+            return arg;
+        }
+
+        // The arg may be an array or List 
+        Object destValue = null;
+        int length = 0;
+        if (arg.getClass().isArray()) {
+            length = Array.getLength(arg);
+        } else {
+            length = ((Collection) arg).size();
+        }
+        if (destClass.isArray()) {
+            if (destClass.getComponentType().isPrimitive()) {
+
+                Object array = Array.newInstance(destClass.getComponentType(),
+                                                 length);
+                // Assign array elements
+                if (arg.getClass().isArray()) {
+                    for (int i = 0; i < length; i++) {
+                        Array.set(array, i, Array.get(arg, i));
+                    }
+                } else {
+                    int idx = 0;
+                    for (Iterator i = ((Collection)arg).iterator();
+                            i.hasNext();) {
+                        Array.set(array, idx++, i.next());
+                    }
+                }
+                destValue = array;
+
+            } else {
+                Object [] array;
+                try {
+                    array = (Object [])Array.newInstance(destClass.getComponentType(),
+                                                         length);
+                } catch (Exception e) {
+                    return arg;
+                }
+
+                // Use convert to assign array elements.
+                if (arg.getClass().isArray()) {
+                    for (int i = 0; i < length; i++) {
+                        array[i] = convert(Array.get(arg, i),
+                                           destClass.getComponentType());
+                    }
+                } else {
+                    int idx = 0;
+                    for (Iterator i = ((Collection)arg).iterator();
+                            i.hasNext();) {
+                        array[idx++] = convert(i.next(),
+                                           destClass.getComponentType());
+                    }
+                }
+                destValue = array;
+            }
+        }
+        else if (Collection.class.isAssignableFrom(destClass)) {
+            Collection newList = null;
+            try {
+                // if we are trying to create an interface, build something
+                // that implements the interface
+                if (destClass == Collection.class || destClass == List.class) {
+                    newList = new ArrayList();
+                } else if (destClass == Set.class) {
+                    newList = new HashSet();
+                } else {
+                    newList = (Collection)destClass.newInstance();
+                }
+            } catch (Exception e) {
+               // No FFDC code needed
+                // Couldn't build one for some reason... so forget it.
+                return arg;
+            }
+
+            if (arg.getClass().isArray()) {
+                for (int j = 0; j < length; j++) {
+                    newList.add(Array.get(arg, j));
+                }
+            } else {
+                for (Iterator j = ((Collection)arg).iterator();
+                            j.hasNext();) {
+                    newList.add(j.next());
+                }
+            }
+            destValue = newList;
+        }
+        else {
+            destValue = arg;
+        }
+        return destValue;
+    }
+}

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/wrapper/impl/PropertyInfo.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/wrapper/impl/PropertyInfo.java?view=diff&rev=483756&r1=483755&r2=483756
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/wrapper/impl/PropertyInfo.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/wrapper/impl/PropertyInfo.java Thu Dec  7 16:22:04 2006
@@ -17,11 +17,16 @@
 
 package org.apache.axis2.jaxws.wrapper.impl;
 
+import java.beans.IndexedPropertyDescriptor;
 import java.beans.PropertyDescriptor;
+import java.lang.reflect.Array;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.Collection;
 
+import org.apache.axis2.jaxws.ExceptionFactory;
+import org.apache.axis2.jaxws.i18n.Messages;
+import org.apache.axis2.jaxws.util.ConvertUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -64,39 +69,131 @@
 	 * @throws IllegalAccessException
 	 * @throws JAXBWrapperException
 	 */
-	public void set(Object targetBean, Object propValue)throws InvocationTargetException, IllegalAccessException, JAXBWrapperException{
-		Method method = descriptor.getWriteMethod();
-        // JAXB provides setters for atomic values.
-        // For non-atomic values (i.e. lists, collections), there is no setter.
-		if (method != null) {
-            // Method exists, this is the atomic case
-		    Object[] object = new Object[]{propValue};
-		    Class[] paramTypes = method.getParameterTypes();
-		    if(paramTypes !=null && paramTypes.length ==1){
-		        Class paramType = paramTypes[0];
-		        if(paramType.isPrimitive() && propValue == null){
-		            //Ignoring null value for primitive type, this could potentially be the way of a customer indicating to set
-		            //default values defined in JAXBObject/xmlSchema.
-		            if(log.isDebugEnabled()){
-		                log.debug("Ignoring null value for primitive type, this is the way to set default values defined in JAXBObject/xmlSchema. for primitive types");
-		            }
-		            return;
-                }
-			}
-            method.invoke(targetBean, object);
-		} else {
-            // There is no setter, we will assume that this is the Collection case
-            // Get the collection. (If there is no collection, the JAXB bean will construct a new one; thus 
-            // collection will always be non-null.)
-		    Collection collection = (Collection) get(targetBean);
+	public void set(Object targetBean, Object propValue) throws InvocationTargetException, IllegalAccessException, JAXBWrapperException{
+        
+        // No set occurs if the value is null
+        if (propValue == null) {
+            return;
+        }
             
-            // Now add our our object to the collection
-            collection.clear();
-            if (propValue != null) {
-                collection.addAll((Collection) propValue);
+        // There are 3 different types of setters that can occur.
+        // 1) Normal Attomic Setter : setFoo(type)
+        // 2) Indexed Array Setter : setFoo(type[])
+        // 3) No Setter case if the property is a List<T>.
+        
+        Method writeMethod = descriptor.getWriteMethod();
+        if (descriptor instanceof IndexedPropertyDescriptor) {
+            // Set for indexed  T[]
+            setIndexedArray(targetBean, propValue, writeMethod);
+        } else if (writeMethod == null) {
+            // Set for List<T>
+            setList(targetBean, propValue);
+        } else {
+            // Normal case
+            setAtomic(targetBean, propValue, writeMethod);
+        }
+    }
+    
+    /**
+     * Set the property value onto targetBean using the writeMethod
+     * @param targetBean
+     * @param propValue
+     * @param writeMethod (set(T))
+     * @throws InvocationTargetException
+     * @throws IllegalAccessException
+     * @throws JAXBWrapperException
+     */
+    private void setAtomic(Object targetBean, Object propValue, Method writeMethod) 
+        throws InvocationTargetException, IllegalAccessException, JAXBWrapperException {
+        // JAXB provides setters for atomic value.
+        Object[] object = new Object[]{propValue};
+        Class[] paramTypes = writeMethod.getParameterTypes();
+        if(paramTypes !=null && paramTypes.length ==1){
+            Class paramType = paramTypes[0];
+            if(paramType.isPrimitive() && propValue == null){
+                //Ignoring null value for primitive type, this could potentially be the way of a customer indicating to set
+                //default values defined in JAXBObject/xmlSchema.
+                if(log.isDebugEnabled()){
+                    log.debug("Ignoring null value for primitive type, this is the way to set default values defined in JAXBObject/xmlSchema. for primitive types");
+                }
+                return;
             }
         }
-		
-	}
-	
+        writeMethod.invoke(targetBean, object);
+    }
+    
+    /**
+     * Set the property value using the indexed array setter
+     * @param targetBean
+     * @param propValue
+     * @param writeMethod set(T[])
+     * @throws InvocationTargetException
+     * @throws IllegalAccessException
+     * @throws JAXBWrapperException
+     */
+    private void setIndexedArray(Object targetBean, Object propValue, Method writeMethod) 
+        throws InvocationTargetException, IllegalAccessException, JAXBWrapperException {
+        
+        Class paramType = writeMethod.getParameterTypes()[0];
+        Object value = asArray(propValue, paramType);
+        // JAXB provides setters for atomic value.
+        Object[] object = new Object[]{value};
+        
+        writeMethod.invoke(targetBean, value);
+    }
+    /**
+     * Set the property value for the collection case.
+     * @param targetBean
+     * @param propValue
+     * @throws InvocationTargetException
+     * @throws IllegalAccessException
+     * @throws JAXBWrapperException
+     */
+    private void setList(Object targetBean, Object propValue) throws InvocationTargetException, IllegalAccessException, JAXBWrapperException {
+        // For the List<T> case, there is no setter. 
+        // You are supposed to use the getter to obtain access to the collection and then add the collection
+        
+        Collection value = asCollection(propValue, descriptor.getPropertyType());
+        Collection collection = (Collection) get(targetBean);
+        
+        // Now add our our object to the collection
+        collection.clear();
+        if (propValue != null) {
+            collection.addAll(value);
+        }
+    }
+            
+    /**
+     * @param propValue
+     * @param destType
+     * @return propValue as a Collection
+     */
+    private static Collection asCollection(Object propValue, Class destType) {
+        // TODO Missing function
+        // Convert the object into an equivalent object that is a collection
+        if (ConvertUtils.isConvertable(propValue, destType)) {
+            return (Collection) ConvertUtils.convert(propValue, destType);
+        } else {
+            String objectClass = (propValue == null) ? "null" : propValue.getClass().getName();
+            throw ExceptionFactory.makeWebServiceException(
+                    Messages.getMessage("convertProblem", objectClass, destType.getName()));
+            
+        }
+    }
+    
+    /**
+     * @param propValue
+     * @param destType T[]
+     * @return array of component type
+     */
+    private static Object asArray(Object propValue, Class destType) {
+        if (ConvertUtils.isConvertable(propValue, destType)) {
+            return ConvertUtils.convert(propValue, destType);
+        } else {
+            String objectClass = (propValue == null) ? "null" : propValue.getClass().getName();
+            throw ExceptionFactory.makeWebServiceException(
+                    Messages.getMessage("convertProblem", objectClass, destType.getName()));
+
+        }
+    }
 }

Modified: webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/gorilla_dlw.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/gorilla_dlw.wsdl?view=diff&rev=483756&r1=483755&r2=483756
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/gorilla_dlw.wsdl (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/wsdl/gorilla_dlw.wsdl Thu Dec  7 16:22:04 2006
@@ -5,10 +5,12 @@
     targetNamespace="http://org/apache/axis2/jaxws/proxy/gorilla_dlw" 
     xmlns:tns="http://org/apache/axis2/jaxws/proxy/gorilla_dlw" 
     xmlns:data="http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data"
+    xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"  jaxb:version="2.0"
     xmlns="http://schemas.xmlsoap.org/wsdl/">
   <types>
     <!-- Use elementFormDefault=qualified.  Many users use this setting for interop compatibility -->
     <s:schema elementFormDefault="qualified" 
+        xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"  jaxb:version="2.0"
         targetNamespace="http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data" >
 
       <s:import namespace="http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data2"  />
@@ -121,6 +123,9 @@
       </s:element>
 
       <!-- Echo stringList.  Tests xsd:list-->
+      <!-- Both the SEI and the bean use List String to represent the data.  -->
+      <!-- But there are some semantic differences between this and echoStringArray -->
+      <!-- due to xml differences between xsd:list and maxOccurs unbounded -->
       <s:element name="echoStringList">
         <s:complexType>
           <s:sequence>
@@ -137,7 +142,63 @@
         </s:complexType>
       </s:element>
 
-      <!-- Echo a String.  This also supports the situation where there is no string -->
+      <!-- Just like stringList, except the SEI parameter is manually changed to String[] -->
+      <!-- This will test List <-> java Array processing -->
+      <s:element name="echoStringListAlt">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="data" type="data:stringList" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
+      <s:element name="echoStringListAltResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="result" type="data:stringList" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
+      <!-- Just like stringList, except the SEI parameter is manually changed to LinkedList String -->
+      <!-- This will test List <-> java Array processing -->
+      <s:element name="echoStringListAsLinkedList">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="data" type="data:stringList" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
+      <s:element name="echoStringListAltAsLinkedListResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="result" type="data:stringList" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
+      <!-- The SEI and bean property map to List List String -->
+      <s:element name="echoStringListArray">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="unbounded" name="data" type="data:stringList" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
+      <s:element name="echoStringListArrayResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="unbounded" name="result" type="data:stringList" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
+      <!-- Echo a String aray. -->
+      <!-- Probably the most common case.  Both the SEI and bean are mapped to List String -->
+      <!-- The xml maxOccurs semantics are used to marshal and unmarshal the values... -->
+      <!-- Which makes this a little different than the echoStringList case -->
       <s:element name="echoStringArray">
         <s:complexType>
           <s:sequence>
@@ -153,6 +214,68 @@
         </s:complexType>
       </s:element>
 
+      <!-- Same as echoStringArray, except the SEI is manually changed to String[] -->
+      <s:element name="echoStringArrayAlt">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="unbounded" name="data" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="echoStringArrayAltResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="unbounded" name="result" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
+      <!-- Same as echoStringArray, except the SEI is manually changed to LinkedList String -->
+      <s:element name="echoStringArrayAsLinkedList">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="unbounded" name="data" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="echoStringArrayAsLinkedListResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="unbounded" name="result" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
+      <!-- Echo Indexed String Array -->
+      <!-- In this case the parameter is a List String, but the bean property uses the indexed -->
+      <!-- setter/getter style methods -->
+      <s:element name="echoIndexedStringArray">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="unbounded" name="data" type="s:string" >
+              <s:annotation>
+                <s:appinfo>
+                  <jaxb:property collectionType="indexed" />
+                </s:appinfo>
+              </s:annotation>
+            </s:element>
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="echoIndexedStringArrayResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="unbounded" name="result" type="s:string" >
+              <s:annotation>
+                <s:appinfo>
+                  <jaxb:property collectionType="indexed" />
+                </s:appinfo>
+              </s:annotation>
+            </s:element>
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
       <!-- Echo combined String-->
       <s:element name="echoString2Array">
         <s:complexType>
@@ -292,6 +415,25 @@
   <message name="echoStringListResponse">
     <part name="x" element="data:echoStringListResponse" />
   </message>
+  <message name="echoStringListAlt">
+    <part name="x" element="data:echoStringListAlt" />
+  </message>
+  <message name="echoStringListAltResponse">
+    <part name="x" element="data:echoStringListAltResponse" />
+  </message>
+  <message name="echoStringListAsLinkedList">
+    <part name="x" element="data:echoStringListAsLinkedList" />
+  </message>
+  <message name="echoStringListAsLinkedListResponse">
+    <part name="x" element="data:echoStringListAsLinkedListResponse" />
+  </message>
+
+  <message name="echoStringListArray">
+    <part name="x" element="data:echoStringListArray" />
+  </message>
+  <message name="echoStringListArrayResponse">
+    <part name="x" element="data:echoStringListArrayResponse" />
+  </message>
 
   <message name="echoStringArray">
     <part name="x" element="data:echoStringArray" />
@@ -300,6 +442,27 @@
     <part name="x" element="data:echoStringArrayResponse" />
   </message>
 
+  <message name="echoStringArrayAlt">
+    <part name="x" element="data:echoStringArrayAlt" />
+  </message>
+  <message name="echoStringArrayAltResponse">
+    <part name="x" element="data:echoStringArrayAltResponse" />
+  </message>
+
+  <message name="echoStringArrayAsLinkedList">
+    <part name="x" element="data:echoStringArrayAsLinkedList" />
+  </message>
+  <message name="echoStringArrayAsLinkedListResponse">
+    <part name="x" element="data:echoStringArrayAsLinkedListResponse" />
+  </message>
+  
+  <message name="echoIndexedStringArray">
+    <part name="x" element="data:echoIndexedStringArray" />
+  </message>
+  <message name="echoIndexedStringArrayResponse">
+    <part name="x" element="data:echoIndexedStringArrayResponse" />
+  </message>
+
   <message name="echoString2Array">
     <part name="x" element="data:echoString2Array" />
   </message>
@@ -355,17 +518,52 @@
       <output message="tns:echoAnyTypeResponse" />
       <fault  name="assertFault" message="tns:assertFault" />
     </operation>
+
     <operation name="echoStringList">
       <input message="tns:echoStringList" />
       <output message="tns:echoStringListResponse" />
       <fault  name="assertFault" message="tns:assertFault" />
     </operation>
+    <operation name="echoStringListAlt">
+      <input message="tns:echoStringListAlt" />
+      <output message="tns:echoStringListAltResponse" />
+      <fault  name="assertFault" message="tns:assertFault" />
+    </operation>
+    <operation name="echoStringListAsLinkedList">
+      <input message="tns:echoStringListAsLinkedList" />
+      <output message="tns:echoStringListAsLinkedListResponse" />
+      <fault  name="assertFault" message="tns:assertFault" />
+    </operation>
+   
+    <operation name="echoStringListArray">
+      <input message="tns:echoStringListArray" />
+      <output message="tns:echoStringListArrayResponse" />
+      <fault  name="assertFault" message="tns:assertFault" />
+    </operation>
 
     <operation name="echoStringArray">
       <input message="tns:echoStringArray" />
       <output message="tns:echoStringArrayResponse" />
       <fault name="assertFault" message="tns:assertFault" />
     </operation>
+    <operation name="echoStringArrayAlt">
+      <input message="tns:echoStringArrayAlt" />
+      <output message="tns:echoStringArrayAltResponse" />
+      <fault name="assertFault" message="tns:assertFault" />
+    </operation>
+
+   <operation name="echoStringArrayAsLinkedList">
+      <input message="tns:echoStringArrayAsLinkedList" />
+      <output message="tns:echoStringArrayAsLinkedListResponse" />
+      <fault name="assertFault" message="tns:assertFault" />
+    </operation>
+
+
+    <operation name="echoIndexedStringArray">
+      <input message="tns:echoIndexedStringArray" />
+      <output message="tns:echoIndexedStringArrayResponse" />
+      <fault name="assertFault" message="tns:assertFault" />
+    </operation>
 
     <operation name="echoString2Array">
       <input message="tns:echoString2Array" />
@@ -464,6 +662,42 @@
         <soap:fault name="assertFault" use="literal" />
       </fault>
     </operation>
+    <operation name="echoStringListAlt">
+      <soap:operation style="document" />
+      <input>
+        <soap:body use="literal" />
+      </input>
+      <output>
+        <soap:body use="literal" />
+      </output>
+      <fault name="assertFault">
+        <soap:fault name="assertFault" use="literal" />
+      </fault>
+    </operation>
+    <operation name="echoStringListAsLinkedList">
+      <soap:operation style="document" />
+      <input>
+        <soap:body use="literal" />
+      </input>
+      <output>
+        <soap:body use="literal" />
+      </output>
+      <fault name="assertFault">
+        <soap:fault name="assertFault" use="literal" />
+      </fault>
+    </operation>
+    <operation name="echoStringListArray">
+      <soap:operation style="document" />
+      <input>
+        <soap:body use="literal" />
+      </input>
+      <output>
+        <soap:body use="literal" />
+      </output>
+      <fault name="assertFault">
+        <soap:fault name="assertFault" use="literal" />
+      </fault>
+    </operation>
 
     <operation name="echoStringArray">
       <soap:operation style="document" />
@@ -477,6 +711,44 @@
         <soap:fault name="assertFault" use="literal" />
       </fault>
     </operation>
+    <operation name="echoStringArrayAlt">
+      <soap:operation style="document" />
+      <input>
+        <soap:body use="literal" />
+      </input>
+      <output>
+        <soap:body use="literal" />
+      </output>
+      <fault name="assertFault">
+        <soap:fault name="assertFault" use="literal" />
+      </fault>
+    </operation>
+    <operation name="echoStringArrayAsLinkedList">
+      <soap:operation style="document" />
+      <input>
+        <soap:body use="literal" />
+      </input>
+      <output>
+        <soap:body use="literal" />
+      </output>
+      <fault name="assertFault">
+        <soap:fault name="assertFault" use="literal" />
+      </fault>
+    </operation>
+
+    <operation name="echoIndexedStringArray">
+      <soap:operation style="document" />
+      <input>
+        <soap:body use="literal" />
+      </input>
+      <output>
+        <soap:body use="literal" />
+      </output>
+      <fault name="assertFault">
+        <soap:fault name="assertFault" use="literal" />
+      </fault>
+    </operation>
+
     <operation name="echoString2Array">
       <soap:operation style="document" />
       <input>

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/GorillaDLWProxyTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/GorillaDLWProxyTests.java?view=diff&rev=483756&r1=483755&r2=483756
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/GorillaDLWProxyTests.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/GorillaDLWProxyTests.java Thu Dec  7 16:22:04 2006
@@ -176,6 +176,60 @@
      * Test of String Array (string maxOccurs=unbounded)
      * @throws Exception
      */
+    public void testEchoIndexedStringArray() throws Exception {
+        try{ 
+            GorillaInterface proxy = getProxy();
+            
+            // Test sending Hello World
+            List<String> request1 = new ArrayList<String>();
+            request1.add("Hello");
+            request1.add("World");
+            List<String> response1 = proxy.echoIndexedStringArray(request1);
+            assertTrue(response1 != null);
+            assertTrue(compareLists(request1, response1));
+            
+            // Test with empty list
+            List<String> request2 = new ArrayList<String>();
+            List<String> response2 = proxy.echoIndexedStringArray(request2);
+            assertTrue(response2 != null);
+            assertTrue(compareLists(request2, response2));
+            
+            // Test with null
+            // Note that the response will be an empty array because
+            // the JAXB bean will never represent List<String> as a null.  This is expected.
+            List<String> request3 = null;
+            List<String> response3 = proxy.echoIndexedStringArray(request3);
+            assertTrue(response3 != null && response3.size() == 0);
+            
+            // Test sending Hello null World
+            // Note that the null is preserved and the request and response
+            // are the same..note that this is different than the xsd:list processing (see testStringList above)
+            // This is expected.
+            List<String> request4 = new ArrayList<String>();
+            request4.add("Hello");
+            request4.add(null);
+            request4.add("World");
+            List<String> response4 = proxy.echoIndexedStringArray(request4);
+            assertTrue(response4!= null);
+            assertTrue(compareLists(request4, response4));  // Response 4 should be the same as Request 1
+            
+            // Test sending "Hello World"
+            // Note that the Hello World remains one item.
+            List<String> request5 = new ArrayList<String>();
+            request5.add("Hello World");
+            List<String> response5 = proxy.echoIndexedStringArray(request5);
+            assertTrue(response5!= null);
+            assertTrue(compareLists(request5, response5)); // Response 5 should be the same as Request 1
+        }catch(Exception e){ 
+            e.printStackTrace(); 
+            fail("Exception received" + e);
+        }
+    }
+    
+    /**
+     * Test of String Array (string maxOccurs=unbounded)
+     * @throws Exception
+     */
     public void testEchoStringArray() throws Exception {
         try{ 
             GorillaInterface proxy = getProxy();
@@ -190,7 +244,7 @@
             
             // Test with empty list
             List<String> request2 = new ArrayList<String>();
-            List<String> response2 = proxy.echoStringList(request2);
+            List<String> response2 = proxy.echoStringArray(request2);
             assertTrue(response2 != null);
             assertTrue(compareLists(request2, response2));
             

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/gorilla_dlw/GorillaProxyImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/gorilla_dlw/GorillaProxyImpl.java?view=diff&rev=483756&r1=483755&r2=483756
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/gorilla_dlw/GorillaProxyImpl.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/gorilla_dlw/GorillaProxyImpl.java Thu Dec  7 16:22:04 2006
@@ -78,13 +78,29 @@
             throws AssertFault {
         return data;
     }
+    
+    public String[] echoStringListAlt(String[] data) throws AssertFault {
+       return data;
+    }
 
+    public List<List<String>> echoStringListArray(List<List<String>> data) throws AssertFault {
+        return data;
+    }
+    
     /* (non-Javadoc)
      * @see org.apache.axis2.jaxws.proxy.gorilla_dlw.sei.GorillaInterface#echoStringArray(java.util.List)
      */
     public List<String> echoStringArray(List<String> data) throws AssertFault {
         return data;
     }
+    
+    public String[] echoStringArrayAlt(String[] data) throws AssertFault {
+        return data;
+    }
+
+    public List<String> echoIndexedStringArray(List<String> data) throws AssertFault {
+        return data;
+    }
 
     /* (non-Javadoc)
      * @see org.apache.axis2.jaxws.proxy.gorilla_dlw.sei.GorillaInterface#echoString2Array(java.util.List, javax.xml.ws.Holder)
@@ -115,5 +131,4 @@
     public List<Fruit> echoEnumArray(List<Fruit> data) throws AssertFault {
         return data;
     }
-
 }

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/gorilla_dlw/META-INF/gorilla_dlw.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/gorilla_dlw/META-INF/gorilla_dlw.wsdl?view=diff&rev=483756&r1=483755&r2=483756
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/gorilla_dlw/META-INF/gorilla_dlw.wsdl (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/gorilla_dlw/META-INF/gorilla_dlw.wsdl Thu Dec  7 16:22:04 2006
@@ -5,10 +5,12 @@
     targetNamespace="http://org/apache/axis2/jaxws/proxy/gorilla_dlw" 
     xmlns:tns="http://org/apache/axis2/jaxws/proxy/gorilla_dlw" 
     xmlns:data="http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data"
+    xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"  jaxb:version="2.0"
     xmlns="http://schemas.xmlsoap.org/wsdl/">
   <types>
     <!-- Use elementFormDefault=qualified.  Many users use this setting for interop compatibility -->
     <s:schema elementFormDefault="qualified" 
+        xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"  jaxb:version="2.0"
         targetNamespace="http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data" >
 
       <s:import namespace="http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data2"  />
@@ -121,6 +123,9 @@
       </s:element>
 
       <!-- Echo stringList.  Tests xsd:list-->
+      <!-- Both the SEI and the bean use List String to represent the data.  -->
+      <!-- But there are some semantic differences between this and echoStringArray -->
+      <!-- due to xml differences between xsd:list and maxOccurs unbounded -->
       <s:element name="echoStringList">
         <s:complexType>
           <s:sequence>
@@ -137,7 +142,63 @@
         </s:complexType>
       </s:element>
 
-      <!-- Echo a String.  This also supports the situation where there is no string -->
+      <!-- Just like stringList, except the SEI parameter is manually changed to String[] -->
+      <!-- This will test List <-> java Array processing -->
+      <s:element name="echoStringListAlt">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="data" type="data:stringList" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
+      <s:element name="echoStringListAltResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="result" type="data:stringList" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
+      <!-- Just like stringList, except the SEI parameter is manually changed to LinkedList String -->
+      <!-- This will test List <-> java Array processing -->
+      <s:element name="echoStringListAsLinkedList">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="data" type="data:stringList" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
+      <s:element name="echoStringListAltAsLinkedListResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="result" type="data:stringList" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
+      <!-- The SEI and bean property map to List List String -->
+      <s:element name="echoStringListArray">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="unbounded" name="data" type="data:stringList" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
+      <s:element name="echoStringListArrayResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="unbounded" name="result" type="data:stringList" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
+      <!-- Echo a String aray. -->
+      <!-- Probably the most common case.  Both the SEI and bean are mapped to List String -->
+      <!-- The xml maxOccurs semantics are used to marshal and unmarshal the values... -->
+      <!-- Which makes this a little different than the echoStringList case -->
       <s:element name="echoStringArray">
         <s:complexType>
           <s:sequence>
@@ -153,6 +214,68 @@
         </s:complexType>
       </s:element>
 
+      <!-- Same as echoStringArray, except the SEI is manually changed to String[] -->
+      <s:element name="echoStringArrayAlt">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="unbounded" name="data" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="echoStringArrayAltResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="unbounded" name="result" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
+      <!-- Same as echoStringArray, except the SEI is manually changed to LinkedList String -->
+      <s:element name="echoStringArrayAsLinkedList">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="unbounded" name="data" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="echoStringArrayAsLinkedListResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="unbounded" name="result" type="s:string" />
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
+      <!-- Echo Indexed String Array -->
+      <!-- In this case the parameter is a List String, but the bean property uses the indexed -->
+      <!-- setter/getter style methods -->
+      <s:element name="echoIndexedStringArray">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="unbounded" name="data" type="s:string" >
+              <s:annotation>
+                <s:appinfo>
+                  <jaxb:property collectionType="indexed" />
+                </s:appinfo>
+              </s:annotation>
+            </s:element>
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+      <s:element name="echoIndexedStringArrayResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="unbounded" name="result" type="s:string" >
+              <s:annotation>
+                <s:appinfo>
+                  <jaxb:property collectionType="indexed" />
+                </s:appinfo>
+              </s:annotation>
+            </s:element>
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
       <!-- Echo combined String-->
       <s:element name="echoString2Array">
         <s:complexType>
@@ -292,6 +415,25 @@
   <message name="echoStringListResponse">
     <part name="x" element="data:echoStringListResponse" />
   </message>
+  <message name="echoStringListAlt">
+    <part name="x" element="data:echoStringListAlt" />
+  </message>
+  <message name="echoStringListAltResponse">
+    <part name="x" element="data:echoStringListAltResponse" />
+  </message>
+  <message name="echoStringListAsLinkedList">
+    <part name="x" element="data:echoStringListAsLinkedList" />
+  </message>
+  <message name="echoStringListAsLinkedListResponse">
+    <part name="x" element="data:echoStringListAsLinkedListResponse" />
+  </message>
+
+  <message name="echoStringListArray">
+    <part name="x" element="data:echoStringListArray" />
+  </message>
+  <message name="echoStringListArrayResponse">
+    <part name="x" element="data:echoStringListArrayResponse" />
+  </message>
 
   <message name="echoStringArray">
     <part name="x" element="data:echoStringArray" />
@@ -300,6 +442,27 @@
     <part name="x" element="data:echoStringArrayResponse" />
   </message>
 
+  <message name="echoStringArrayAlt">
+    <part name="x" element="data:echoStringArrayAlt" />
+  </message>
+  <message name="echoStringArrayAltResponse">
+    <part name="x" element="data:echoStringArrayAltResponse" />
+  </message>
+
+  <message name="echoStringArrayAsLinkedList">
+    <part name="x" element="data:echoStringArrayAsLinkedList" />
+  </message>
+  <message name="echoStringArrayAsLinkedListResponse">
+    <part name="x" element="data:echoStringArrayAsLinkedListResponse" />
+  </message>
+  
+  <message name="echoIndexedStringArray">
+    <part name="x" element="data:echoIndexedStringArray" />
+  </message>
+  <message name="echoIndexedStringArrayResponse">
+    <part name="x" element="data:echoIndexedStringArrayResponse" />
+  </message>
+
   <message name="echoString2Array">
     <part name="x" element="data:echoString2Array" />
   </message>
@@ -355,17 +518,52 @@
       <output message="tns:echoAnyTypeResponse" />
       <fault  name="assertFault" message="tns:assertFault" />
     </operation>
+
     <operation name="echoStringList">
       <input message="tns:echoStringList" />
       <output message="tns:echoStringListResponse" />
       <fault  name="assertFault" message="tns:assertFault" />
     </operation>
+    <operation name="echoStringListAlt">
+      <input message="tns:echoStringListAlt" />
+      <output message="tns:echoStringListAltResponse" />
+      <fault  name="assertFault" message="tns:assertFault" />
+    </operation>
+    <operation name="echoStringListAsLinkedList">
+      <input message="tns:echoStringListAsLinkedList" />
+      <output message="tns:echoStringListAsLinkedListResponse" />
+      <fault  name="assertFault" message="tns:assertFault" />
+    </operation>
+   
+    <operation name="echoStringListArray">
+      <input message="tns:echoStringListArray" />
+      <output message="tns:echoStringListArrayResponse" />
+      <fault  name="assertFault" message="tns:assertFault" />
+    </operation>
 
     <operation name="echoStringArray">
       <input message="tns:echoStringArray" />
       <output message="tns:echoStringArrayResponse" />
       <fault name="assertFault" message="tns:assertFault" />
     </operation>
+    <operation name="echoStringArrayAlt">
+      <input message="tns:echoStringArrayAlt" />
+      <output message="tns:echoStringArrayAltResponse" />
+      <fault name="assertFault" message="tns:assertFault" />
+    </operation>
+
+   <operation name="echoStringArrayAsLinkedList">
+      <input message="tns:echoStringArrayAsLinkedList" />
+      <output message="tns:echoStringArrayAsLinkedListResponse" />
+      <fault name="assertFault" message="tns:assertFault" />
+    </operation>
+
+
+    <operation name="echoIndexedStringArray">
+      <input message="tns:echoIndexedStringArray" />
+      <output message="tns:echoIndexedStringArrayResponse" />
+      <fault name="assertFault" message="tns:assertFault" />
+    </operation>
 
     <operation name="echoString2Array">
       <input message="tns:echoString2Array" />
@@ -464,6 +662,42 @@
         <soap:fault name="assertFault" use="literal" />
       </fault>
     </operation>
+    <operation name="echoStringListAlt">
+      <soap:operation style="document" />
+      <input>
+        <soap:body use="literal" />
+      </input>
+      <output>
+        <soap:body use="literal" />
+      </output>
+      <fault name="assertFault">
+        <soap:fault name="assertFault" use="literal" />
+      </fault>
+    </operation>
+    <operation name="echoStringListAsLinkedList">
+      <soap:operation style="document" />
+      <input>
+        <soap:body use="literal" />
+      </input>
+      <output>
+        <soap:body use="literal" />
+      </output>
+      <fault name="assertFault">
+        <soap:fault name="assertFault" use="literal" />
+      </fault>
+    </operation>
+    <operation name="echoStringListArray">
+      <soap:operation style="document" />
+      <input>
+        <soap:body use="literal" />
+      </input>
+      <output>
+        <soap:body use="literal" />
+      </output>
+      <fault name="assertFault">
+        <soap:fault name="assertFault" use="literal" />
+      </fault>
+    </operation>
 
     <operation name="echoStringArray">
       <soap:operation style="document" />
@@ -477,6 +711,44 @@
         <soap:fault name="assertFault" use="literal" />
       </fault>
     </operation>
+    <operation name="echoStringArrayAlt">
+      <soap:operation style="document" />
+      <input>
+        <soap:body use="literal" />
+      </input>
+      <output>
+        <soap:body use="literal" />
+      </output>
+      <fault name="assertFault">
+        <soap:fault name="assertFault" use="literal" />
+      </fault>
+    </operation>
+    <operation name="echoStringArrayAsLinkedList">
+      <soap:operation style="document" />
+      <input>
+        <soap:body use="literal" />
+      </input>
+      <output>
+        <soap:body use="literal" />
+      </output>
+      <fault name="assertFault">
+        <soap:fault name="assertFault" use="literal" />
+      </fault>
+    </operation>
+
+    <operation name="echoIndexedStringArray">
+      <soap:operation style="document" />
+      <input>
+        <soap:body use="literal" />
+      </input>
+      <output>
+        <soap:body use="literal" />
+      </output>
+      <fault name="assertFault">
+        <soap:fault name="assertFault" use="literal" />
+      </fault>
+    </operation>
+
     <operation name="echoString2Array">
       <soap:operation style="document" />
       <input>

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/gorilla_dlw/sei/GorillaInterface.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/gorilla_dlw/sei/GorillaInterface.java?view=diff&rev=483756&r1=483755&r2=483756
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/gorilla_dlw/sei/GorillaInterface.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/proxy/gorilla_dlw/sei/GorillaInterface.java Thu Dec  7 16:22:04 2006
@@ -129,6 +129,41 @@
      * 
      * @param data
      * @return
+     *     returns String[]
+     * @throws AssertFault
+     */
+    // NOTE: The return and param are manually changed from List<String> to String[]
+    @WebMethod
+    @WebResult(name = "result", targetNamespace = "http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data")
+    @RequestWrapper(localName = "echoStringListAlt", targetNamespace = "http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data", className = "org.apache.axis2.jaxws.proxy.gorilla_dlw.data.EchoStringListAlt")
+    @ResponseWrapper(localName = "echoStringListAltResponse", targetNamespace = "http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data", className = "org.apache.axis2.jaxws.proxy.gorilla_dlw.data.EchoStringListAltResponse")
+    public String[] echoStringListAlt(
+        @WebParam(name = "data", targetNamespace = "http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data")
+        String[] data)
+        throws AssertFault
+    ;
+
+    /**
+     * 
+     * @param data
+     * @return
+     *     returns java.util.List<java.util.List<java.lang.String>>
+     * @throws AssertFault
+     */
+    @WebMethod
+    @WebResult(name = "result", targetNamespace = "http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data")
+    @RequestWrapper(localName = "echoStringListArray", targetNamespace = "http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data", className = "org.apache.axis2.jaxws.proxy.gorilla_dlw.data.EchoStringListArray")
+    @ResponseWrapper(localName = "echoStringListArrayResponse", targetNamespace = "http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data", className = "org.apache.axis2.jaxws.proxy.gorilla_dlw.data.EchoStringListArrayResponse")
+    public List<List<String>> echoStringListArray(
+        @WebParam(name = "data", targetNamespace = "http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data")
+        List<List<String>> data)
+        throws AssertFault
+    ;
+
+    /**
+     * 
+     * @param data
+     * @return
      *     returns java.util.List<java.lang.String>
      * @throws AssertFault
      */
@@ -141,6 +176,42 @@
         List<String> data)
         throws AssertFault
     ;
+    
+    /**
+     * 
+     * @param data
+     * @return
+     *     returns String[]
+     * @throws AssertFault
+     */
+    //  NOTE: The return and param are manually changed from List<String> to String[]
+    @WebMethod
+    @WebResult(name = "result", targetNamespace = "http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data")
+    @RequestWrapper(localName = "echoStringArrayAlt", targetNamespace = "http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data", className = "org.apache.axis2.jaxws.proxy.gorilla_dlw.data.EchoStringArrayAlt")
+    @ResponseWrapper(localName = "echoStringArrayAltResponse", targetNamespace = "http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data", className = "org.apache.axis2.jaxws.proxy.gorilla_dlw.data.EchoStringArrayAltResponse")
+    public String[] echoStringArrayAlt(
+        @WebParam(name = "data", targetNamespace = "http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data")
+        String[] data)
+        throws AssertFault
+    ;
+
+    /**
+     * 
+     * @param data
+     * @return
+     *     returns java.util.List<java.lang.String>
+     * @throws AssertFault
+     */
+    @WebMethod
+    @WebResult(name = "result", targetNamespace = "http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data")
+    @RequestWrapper(localName = "echoIndexedStringArray", targetNamespace = "http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data", className = "org.apache.axis2.jaxws.proxy.gorilla_dlw.data.EchoIndexedStringArray")
+    @ResponseWrapper(localName = "echoIndexedStringArrayResponse", targetNamespace = "http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data", className = "org.apache.axis2.jaxws.proxy.gorilla_dlw.data.EchoIndexedStringArrayResponse")
+    public List<String> echoIndexedStringArray(
+        @WebParam(name = "data", targetNamespace = "http://org/apache/axis2/jaxws/proxy/gorilla_dlw/data")
+        List<String> data)
+        throws AssertFault
+    ;
+    
 
     /**
      * 



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