axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r528924 - /webservices/axis/trunk/java/src/org/apache/axis/wsdl/toJava/JavaBeanWriter.java
Date Sun, 15 Apr 2007 04:24:29 GMT
Author: gawor
Date: Sat Apr 14 21:24:28 2007
New Revision: 528924

URL: http://svn.apache.org/viewvc?view=rev&rev=528924
Log:
generate getters/setters for restrictions on xsd:anyType (should address AXIS-1672)

Modified:
    webservices/axis/trunk/java/src/org/apache/axis/wsdl/toJava/JavaBeanWriter.java

Modified: webservices/axis/trunk/java/src/org/apache/axis/wsdl/toJava/JavaBeanWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/java/src/org/apache/axis/wsdl/toJava/JavaBeanWriter.java?view=diff&rev=528924&r1=528923&r2=528924
==============================================================================
--- webservices/axis/trunk/java/src/org/apache/axis/wsdl/toJava/JavaBeanWriter.java (original)
+++ webservices/axis/trunk/java/src/org/apache/axis/wsdl/toJava/JavaBeanWriter.java Sat Apr
14 21:24:28 2007
@@ -141,18 +141,28 @@
             // or accessor/mutator pairs as those are inherited from
             // the super type, which must be non-null.
             if (null != extendType) {
-            	if (null != SchemaUtils.getComplexElementRestrictionBase(
-                        type.getNode(), emitter.getSymbolTable())) {
-	                enableMemberFields = false;
-	                enableGetters = false;
-	                enableSetters = false;
-	                enableEquals = false;
-	                enableHashCode = false;
-            	} else {
-            		// derived by extension.
-            		// Write full constructor, so that instance variables
-            		// in super class are intialized.
-        			enableFullConstructor = true;
+                TypeEntry typeEntry = SchemaUtils
+                    .getComplexElementRestrictionBase(type.getNode(),
+                                                      emitter.getSymbolTable());
+                if (typeEntry != null) {
+                    if (typeEntry.getQName().equals(Constants.XSD_ANYTYPE)) {
+                        enableMemberFields = true;
+                        enableGetters = true;
+                        enableSetters = true;
+                        enableEquals = false;
+                        enableHashCode = false;
+                    } else {
+                        enableMemberFields = false;
+                        enableGetters = false;
+                        enableSetters = false;
+                        enableEquals = false;
+                        enableHashCode = false;
+                    }
+                } else {
+                    // derived by extension.
+                    // Write full constructor, so that instance variables
+                    // in super class are intialized.
+                    enableFullConstructor = true;
             	}
             }
         }



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


Mime
View raw message