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 aj...@apache.org on 2006/01/23 09:40:09 UTC

svn commit: r371494 - /webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/SchemaCompiler.java

Author: ajith
Date: Mon Jan 23 00:40:04 2006
New Revision: 371494

URL: http://svn.apache.org/viewcvs?rev=371494&view=rev
Log:
Checked in a fix for http://issues.apache.org/jira/browse/AXIS2-409 for now. The cause of this problem is that ADB does not handle complex/simple content inside complexTypes. Now a proper error message is generated stating the problem.

Note - This is a temporary fix and would be corrected soon when the compiler is modified to handle complex content

Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/SchemaCompiler.java

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/SchemaCompiler.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/SchemaCompiler.java?rev=371494&r1=371493&r2=371494&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/SchemaCompiler.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/schema/SchemaCompiler.java Mon Jan 23 00:40:04 2006
@@ -241,7 +241,12 @@
                 }
 
 
-            } else {
+            }else if (xsElt.getRefName()!= null){
+
+                // We need to handle the references here
+
+            }else{
+
                 //we are going to special case the anonymous complex type. Our algorithm for dealing
                 //with it is to generate a single object that has the complex content inside. Really the
                 //intent of the user when he declares the complexType anonymously is to use it privately
@@ -368,7 +373,8 @@
         XmlSchemaParticle particle = complexType.getParticle();
         BeanWriterMetaInfoHolder metaInfHolder = new BeanWriterMetaInfoHolder();
         if (particle != null) {
-            //Process the particle
+            // Process the particle . A particle may be a <code>sequence</code>
+            // ,<code>choice</code> or <code>all</code>
             processParticle(particle, metaInfHolder);
         }
 
@@ -390,6 +396,13 @@
             processAnyAttribute(metaInfHolder);
         }
 
+
+        if (complexType.getContentModel()!= null){
+            //this complex type has content, throw a meaningful exception for now
+            //todo - Finish this
+             throw new RuntimeException(SchemaCompilerMessages.getMessage("schema.unsupportedcontenterror"));
+        }
+
         //since this is a special case (an unnamed complex type) we'll put the already processed
         //metainf holder in a special map to be used later
         this.processedAnonymousComplexTypesMap.put(elt, metaInfHolder);
@@ -435,10 +448,11 @@
 
         if (complexType.getContentModel()!=null){
             //for the time being we cannot deal with these content. so throw an exception
+            //todo Finish this
             throw new RuntimeException(SchemaCompilerMessages.getMessage("schema.unsupportedcontenterror"));
         }
 
-        // Process the other types - Say the complex content, extensions and so on
+        
 
         //write the class. This type mapping would have been populated right now
         //Note - We always write classes for complex types