geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r164256 - /geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java
Date Fri, 22 Apr 2005 17:26:32 GMT
Author: djencks
Date: Fri Apr 22 10:26:31 2005
New Revision: 164256

URL: http://svn.apache.org/viewcvs?rev=164256&view=rev
Log:
we can treat all and sequence alike

Modified:
    geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java

Modified: geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java?rev=164256&r1=164255&r2=164256&view=diff
==============================================================================
--- geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java
(original)
+++ geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java
Fri Apr 22 10:26:31 2005
@@ -53,16 +53,16 @@
     private final ClassLoader cl;
     private final Map schemaTypeKeyToSchemaTypeMap;
     private final Set wrapperElementQNames;
-    
+
     public HeavyweightTypeInfoBuilder(ClassLoader cl, Map schemaTypeKeyToSchemaTypeMap, Set
wrapperElementQNames) {
         this.cl = cl;
         this.schemaTypeKeyToSchemaTypeMap = schemaTypeKeyToSchemaTypeMap;
         this.wrapperElementQNames = wrapperElementQNames;
     }
-    
+
     public List buildTypeInfo(JavaWsdlMappingType mapping) throws DeploymentException {
         List typeInfoList = new ArrayList();
-        
+
         JavaXmlTypeMappingType[] javaXmlTypeMappings = mapping.getJavaXmlTypeMappingArray();
         for (int j = 0; j < javaXmlTypeMappings.length; j++) {
             JavaXmlTypeMappingType javaXmlTypeMapping = javaXmlTypeMappings[j];
@@ -119,34 +119,34 @@
                 deserializerFactoryClass = SimpleListDeserializerFactory.class;
             }
 
-            TypeInfo.UpdatableTypeInfo internalTypeInfo = new TypeInfo.UpdatableTypeInfo();

+            TypeInfo.UpdatableTypeInfo internalTypeInfo = new TypeInfo.UpdatableTypeInfo();
             internalTypeInfo.setClazz(clazz);
             internalTypeInfo.setQName(typeQName);
             internalTypeInfo.setSerializerClass(serializerFactoryClass);
             internalTypeInfo.setDeserializerClass(deserializerFactoryClass);
-            
+
             populateInternalTypeInfo(clazz, typeQName, key, javaXmlTypeMapping, internalTypeInfo);
 
             typeInfoList.add(internalTypeInfo.buildTypeInfo());
         }
-        
+
         return typeInfoList;
     }
-    
+
     private void populateInternalTypeInfo(Class javaClass, QName typeQName, SchemaTypeKey
key, JavaXmlTypeMappingType javaXmlTypeMapping, TypeInfo.UpdatableTypeInfo typeInfo) throws
DeploymentException {
         SchemaType schemaType = (SchemaType) schemaTypeKeyToSchemaTypeMap.get(key);
         if (schemaType == null) {
             throw new DeploymentException("Schema type key " + key + " not found in analyzed
schema: " + schemaTypeKeyToSchemaTypeMap);
         }
         String ns = key.getqName().getNamespaceURI();
-                
         typeInfo.setCanSearchParents(schemaType.getDerivationType() == SchemaType.DT_RESTRICTION);
-        
-        
+
+
         Map nameToType = new HashMap();
         if (null  == schemaType.getContentModel()) {
             ;
-        } else if (SchemaParticle.SEQUENCE == schemaType.getContentModel().getParticleType())
{
+        } else if (SchemaParticle.SEQUENCE == schemaType.getContentModel().getParticleType()
+                || SchemaParticle.ALL == schemaType.getContentModel().getParticleType())
{
             SchemaParticle[] properties = schemaType.getContentModel().getParticleChildren();
             for (int i = 0; i < properties.length; i++) {
                 SchemaParticle parameter = properties[i];
@@ -156,14 +156,14 @@
             SchemaParticle parameter = schemaType.getContentModel();
             nameToType.put(parameter.getName(), parameter);
         } else {
-            throw new DeploymentException("Only sequence particle types are supported." +
+            throw new DeploymentException("Only element, sequence, and all particle types
are supported." +
                     " SchemaType name =" + schemaType.getName());
         }
-        
+
         VariableMappingType[] variableMappings = javaXmlTypeMapping.getVariableMappingArray();
         FieldDesc[] fields = new FieldDesc[variableMappings.length];
         typeInfo.setFields(fields);
-        
+
         PropertyDescriptor[] propertyDescriptors = new PropertyDescriptor[0];
         try {
             propertyDescriptors = Introspector.getBeanInfo(javaClass).getPropertyDescriptors();
@@ -219,7 +219,7 @@
                 elementDesc.setNillable(particle.isNillable());
                 elementDesc.setXmlName(xmlName);
                 elementDesc.setXmlType(particle.getType().getName());
-                
+
                 if (javaType.isArray()) {
                     elementDesc.setMinOccurs(particle.getIntMinOccurs());
                     elementDesc.setMaxOccurs(particle.getIntMaxOccurs());



Mime
View raw message