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 15:21:53 UTC
svn commit: r438481 -
/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
Author: dims
Date: Wed Aug 30 06:21:52 2006
New Revision: 438481
URL: http://svn.apache.org/viewvc?rev=438481&view=rev
Log:
special case references to xs:schema element by mapping them to OMElement
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=438481&r1=438480&r2=438481&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 Wed Aug 30 06:21:52 2006
@@ -543,6 +543,10 @@
//referenced name
}else if (xsElt.getRefName()!=null){
+ if(xsElt.getRefName().equals(SchemaConstants.XSD_SCHEMA)){
+ innerElementMap.put(xsElt.getQName(), SchemaCompiler.DEFAULT_CLASS_NAME);
+ return;
+ }
//process the referenced type. It could be thought that the referenced element replaces this
//element
XmlSchemaElement referencedElement = getReferencedElement(parentSchema, xsElt.getRefName());
@@ -1474,7 +1478,14 @@
SchemaConstants.ARRAY_TYPE :
SchemaConstants.ELEMENT_TYPE);
} else {
- throw new SchemaCompilationException(SchemaCompilerMessages.getMessage("schema.referencedElementNotFound",referencedQName.toString()));
+ if(referencedQName.equals(SchemaConstants.XSD_SCHEMA)) {
+ metainfHolder.registerMapping(referencedQName,
+ null,
+ DEFAULT_CLASS_NAME,
+ SchemaConstants.ANY_TYPE);
+ } else {
+ throw new SchemaCompilationException(SchemaCompilerMessages.getMessage("schema.referencedElementNotFound",referencedQName.toString()));
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org