geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject svn commit: r263837 - /geronimo/trunk/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightTypeInfoBuilder.java
Date Sun, 28 Aug 2005 06:37:17 GMT
Author: gdamour
Date: Sat Aug 27 23:37:10 2005
New Revision: 263837

URL: http://svn.apache.org/viewcvs?rev=263837&view=rev
Log:
GERONIMO-822 Need more flexibility in interpreting jaxrpc mappings of ArrayOfFoo elements
GERONIMO-823 We should accept (and ignore) simple type mappings in a jaxrpc-mapping file

Support some specific mappings generated by the IBM jaxrpc mapping generator.

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=263837&r1=263836&r2=263837&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
Sat Aug 27 23:37:10 2005
@@ -71,7 +71,7 @@
 public class HeavyweightTypeInfoBuilder implements TypeInfoBuilder {
     private static final String SOAP_ENCODING_NS = "http://schemas.xmlsoap.org/soap/encoding/";
     private static final String XML_SCHEMA_NS = "http://www.w3.org/2001/XMLSchema";
-
+    
     private static final Log log = LogFactory.getLog(HeavyweightTypeInfoBuilder.class);
 
     private final ClassLoader cl;
@@ -129,7 +129,11 @@
 
             SchemaType schemaType = (SchemaType) schemaTypeKeyToSchemaTypeMap.get(key);
             if (schemaType == null) {
-//                throw new DeploymentException("Schema type key " + key + " not found in
analyzed schema: " + schemaTypeKeyToSchemaTypeMap);
+                // if it is a built-in type, then one assumes a redundant mapping. 
+                if (null != TypeMappingLookup.getFactoryPair(key.getqName())) {
+                    continue;
+                }
+//              throw new DeploymentException("Schema type key " + key + " not found in analyzed
schema: " + schemaTypeKeyToSchemaTypeMap);
                 log.warn("Schema type key " + key + " not found in analyzed schema: " + schemaTypeKeyToSchemaTypeMap);
                 continue;
             }
@@ -364,8 +368,18 @@
                 }
             }
         }
-
+        
         VariableMappingType[] variableMappings = javaXmlTypeMapping.getVariableMappingArray();
+
+        // short-circuit the processing of arrays as they should not define variable-mapping
elements. 
+        if (javaClass.isArray()) {
+            if (0 != variableMappings.length) {
+                // for portability reason we simply warn and not fail.
+                log.warn("Ignoring variable-mapping defined for class " + javaClass + " which
is an array.");
+            }
+            typeInfo.setFields(new FieldDesc[0]);
+            return;
+        }
 
         FieldDesc[] fields = new FieldDesc[variableMappings.length];
         typeInfo.setFields(fields);



Mime
View raw message