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 di...@apache.org on 2006/08/30 00:08:49 UTC

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

Author: dims
Date: Tue Aug 29 15:08:48 2006
New Revision: 438252

URL: http://svn.apache.org/viewvc?rev=438252&view=rev
Log:
deal better with anonymous types that extend/restrict xsd any example - wsrf wsdl

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

Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java?rev=438252&r1=438251&r2=438252&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java (original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java Tue Aug 29 15:08:48 2006
@@ -964,14 +964,16 @@
 
             //process the particle of this node
             processParticle(extension.getParticle(),metaInfHolder,parentSchema);
+            String className = findClassName(extension.getBaseTypeName(), false);
 
-            //the particle has been processed, However since this is an extension we need to
-            //add the basetype as an extension to the complex type class.
-            // The basetype has been processed already
-            metaInfHolder.setExtension(true);
-            metaInfHolder.setExtensionClassName(findClassName(extension.getBaseTypeName(),false));
-            //Note  - this is no array! so the array boolean is false
-
+            if (!SchemaCompiler.DEFAULT_CLASS_NAME.equals(className)) {
+                //the particle has been processed, However since this is an extension we need to
+                //add the basetype as an extension to the complex type class.
+                // The basetype has been processed already
+                metaInfHolder.setExtension(true);
+                metaInfHolder.setExtensionClassName(className);
+                //Note  - this is no array! so the array boolean is false
+            }
         }else if (content instanceof XmlSchemaComplexContentRestriction){
         	XmlSchemaComplexContentRestriction restriction = (XmlSchemaComplexContentRestriction) content;
 
@@ -998,10 +1000,13 @@
 
             //process the particle of this node
             processParticle(restriction.getParticle(),metaInfHolder,parentSchema);
+            String className = findClassName(restriction.getBaseTypeName(), false);
 
-            metaInfHolder.setRestriction(true);
-            metaInfHolder.setRestrictionClassName(findClassName(restriction.getBaseTypeName(),false));
-            //Note  - this is no array! so the array boolean is false
+            if (!SchemaCompiler.DEFAULT_CLASS_NAME.equals(className)) {
+                metaInfHolder.setRestriction(true);
+                metaInfHolder.setRestrictionClassName(findClassName(restriction.getBaseTypeName(), false));
+                //Note  - this is no array! so the array boolean is false
+            }
         }
     }
 



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