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 am...@apache.org on 2007/06/27 09:15:59 UTC

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

Author: amilas
Date: Wed Jun 27 00:15:58 2007
New Revision: 551082

URL: http://svn.apache.org/viewvc?view=rev&rev=551082
Log:
fixed issue Axis2-1522

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?view=diff&rev=551082&r1=551081&r2=551082
==============================================================================
--- 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 Jun 27 00:15:58 2007
@@ -722,6 +722,11 @@
     private XmlSchema resolveParentSchema(QName schemaTypeName, XmlSchema currentSchema)
             throws SchemaCompilationException {
         String targetNamespace = schemaTypeName.getNamespaceURI();
+
+        // if the current schema has the same namespace we use it
+        if (currentSchema.getTargetNamespace().equals(targetNamespace)){
+            return currentSchema;
+        }
         Object loadedSchema = loadedSchemaMap.get(targetNamespace);
         if (loadedSchema != null) {
             return (XmlSchema) loadedSchema;
@@ -1012,7 +1017,7 @@
            if (xmlSchemaAttributeGroup != null){
                processAttributes(xmlSchemaAttributeGroup.getAttributes(),metaInfHolder,parentSchema);
            } else {
-               throw new SchemaCompilationException("Can not find an attribute group for group reference"
+               throw new SchemaCompilationException("Can not find an attribute group for group reference "
                        + attributeGroupRefName.getLocalPart());
            }
         } else {



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


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

Posted by Davanum Srinivas <da...@gmail.com>.
Amila,

Can you please mark AXIS2-1522 as fixed if it indeed fixes the bug?

https://issues.apache.org/jira/browse/AXIS2-1522

thanks,
dims

On 6/27/07, amilas@apache.org <am...@apache.org> wrote:
> Author: amilas
> Date: Wed Jun 27 00:15:58 2007
> New Revision: 551082
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=551082
> Log:
> fixed issue Axis2-1522
>
> 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?view=diff&rev=551082&r1=551081&r2=551082
> ==============================================================================
> --- 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 Jun 27 00:15:58 2007
> @@ -722,6 +722,11 @@
>      private XmlSchema resolveParentSchema(QName schemaTypeName, XmlSchema currentSchema)
>              throws SchemaCompilationException {
>          String targetNamespace = schemaTypeName.getNamespaceURI();
> +
> +        // if the current schema has the same namespace we use it
> +        if (currentSchema.getTargetNamespace().equals(targetNamespace)){
> +            return currentSchema;
> +        }
>          Object loadedSchema = loadedSchemaMap.get(targetNamespace);
>          if (loadedSchema != null) {
>              return (XmlSchema) loadedSchema;
> @@ -1012,7 +1017,7 @@
>             if (xmlSchemaAttributeGroup != null){
>                 processAttributes(xmlSchemaAttributeGroup.getAttributes(),metaInfHolder,parentSchema);
>             } else {
> -               throw new SchemaCompilationException("Can not find an attribute group for group reference"
> +               throw new SchemaCompilationException("Can not find an attribute group for group reference "
>                         + attributeGroupRefName.getLocalPart());
>             }
>          } else {
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-cvs-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

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