Author: amilas Date: Sat Dec 25 04:18:31 2010 New Revision: 1052751 URL: http://svn.apache.org/viewvc?rev=1052751&view=rev Log: fixed the issue AXIS2-3029
Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java?rev=1052751&r1=1052750&r2=1052751&view=diff ============================================================================== --- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java (original) +++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java Sat Dec 25 04:18:31 2010 @@ -348,6 +348,13 @@ public class SchemaCompiler { //add the schema to the loaded schema list if (!loadedSchemaMap.containsKey(schema.getTargetNamespace())) { loadedSchemaMap.put(schema.getTargetNamespace(), schema); + // when the target name space is not given schema.getTargetNamesapce returns null. + // but when importing import namesapce location is given as "". + // this causese a problem in finding reference elements. see AXIS2-3029 + // kept the null entry as well to safe gaurd any thing which acess using null + if (schema.getTargetNamespace() == null){ + loadedSchemaMap.put("", schema); + } } // If we have/are loading a schema with a specific targetnamespace from a certain URI,