You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by aj...@apache.org on 2006/06/05 19:38:55 UTC
svn commit: r411866 - in
/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema:
SchemaCompiler.java i18n/resource.properties
Author: ajith
Date: Mon Jun 5 10:38:54 2006
New Revision: 411866
URL: http://svn.apache.org/viewvc?rev=411866&view=rev
Log:
1. Added a minor improvement to the schema compiler where it will spit out a proper error message when the schema references are erroneous
Modified:
webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/i18n/resource.properties
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=411866&r1=411865&r2=411866&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 Mon Jun 5 10:38:54 2006
@@ -364,6 +364,13 @@
*/
private void processElement(XmlSchemaElement xsElt, boolean isOuter,Map innerElementMap,List localNillableList, XmlSchema parentSchema) throws SchemaCompilationException {
+ //if the element is null, which usually happens when the qname is not
+ //proper, throw an exceptions
+ if (xsElt==null){
+ throw new SchemaCompilationException(
+ SchemaCompilerMessages.getMessage("schema.elementNull"));
+ }
+
//The processing element logic seems to be quite simple. Look at the relevant schema type
//for each and every element and process that accordingly.
//this means that any unused type definitions would not be generated!
@@ -1100,7 +1107,7 @@
}else if (content instanceof XmlSchemaSimpleTypeUnion) {
//Todo - Handle unions here
throw new SchemaCompilationException(
- SchemaCompilerMessages.getMessage("schema.unsupportedcontenterror","Simple Type Uniont"));
+ SchemaCompilerMessages.getMessage("schema.unsupportedcontenterror","Simple Type Union"));
}else if (content instanceof XmlSchemaSimpleTypeList){
//todo - Handle lists here
Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/i18n/resource.properties
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/i18n/resource.properties?rev=411866&r1=411865&r2=411866&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/i18n/resource.properties (original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/i18n/resource.properties Mon Jun 5 10:38:54 2006
@@ -21,6 +21,7 @@
###################Schema compiler ###########################################
schema.unsupportedcontenterror=Unsupported content {0} !
schema.unknowncontenterror=Unknown content!
+schema.elementNull=Null element encountered! Please check your schema!
################## Options ###################################################
schema.unsupportedvalue=Unsupported value!
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org