axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Veithen <andreas.veit...@gmail.com>
Subject Re: svn commit: r949782 - in /axis/axis2/java/core/trunk/modules/adb-codegen: src/org/apache/axis2/schema/SchemaCompiler.java test-resources/testsuite/chameleon_include.xsd
Date Tue, 08 Jun 2010 19:23:10 GMT
Amila,

As the name of the file implies, the test case that uses
chameleon_include.xsd was designed to check that ADB correctly
supports the chameleon pattern [1]. See AXIS2-3851. By adding a
targetNamespace, the schema no longer uses the chameleon pattern.
Thus, there is probably a regression here.

Andreas

[1] http://www.xfront.com/ZeroOneOrManyNamespaces.html#mixed

On Mon, May 31, 2010 at 18:04,  <amilas@apache.org> wrote:
> Author: amilas
> Date: Mon May 31 16:04:36 2010
> New Revision: 949782
>
> URL: http://svn.apache.org/viewvc?rev=949782&view=rev
> Log:
> Xmlschema searches within the imported and included schema, if QName is given. However
adb code gen need to check only that element exists within the given schema. Changed the schema
compiler to provide the local part of the qname.
>
> Modified:
>    axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
>    axis/axis2/java/core/trunk/modules/adb-codegen/test-resources/testsuite/chameleon_include.xsd
>
> 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=949782&r1=949781&r2=949782&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
Mon May 31 16:04:36 2010
> @@ -722,6 +722,7 @@ public class SchemaCompiler {
>             // here what we want is to set the schema type name for the element
>             if ((referencedElement.getSchemaType() != null)
>                     && (referencedElement.getSchemaType().getQName()
!= null)){
> +
>                 // i.e this element refers to an complex type name
>                 if (!this.processedElementRefMap.containsKey(referencedElement.getQName()))
{
>                     if (this.baseSchemaTypeMap.containsKey(referencedElement.getSchemaTypeName()))
{
> @@ -2728,11 +2729,11 @@ public class SchemaCompiler {
>         boolean isExists = false;
>         switch (componetType) {
>             case COMPONENT_TYPE : {
> -                isExists = (schema.getTypeByName(componentQName) != null);
> +                isExists = (schema.getTypeByName(componentQName.getLocalPart())
!= null);
>                 break;
>             }
>             case COMPONENT_ELEMENT : {
> -                isExists = (schema.getElementByName(componentQName) != null);
> +                isExists = (schema.getElementByName(componentQName.getLocalPart())
!= null);
>                 break;
>             }
>             case COMPONENT_ATTRIBUTE : {
>
> Modified: axis/axis2/java/core/trunk/modules/adb-codegen/test-resources/testsuite/chameleon_include.xsd
> URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/test-resources/testsuite/chameleon_include.xsd?rev=949782&r1=949781&r2=949782&view=diff
> ==============================================================================
> --- axis/axis2/java/core/trunk/modules/adb-codegen/test-resources/testsuite/chameleon_include.xsd
(original)
> +++ axis/axis2/java/core/trunk/modules/adb-codegen/test-resources/testsuite/chameleon_include.xsd
Mon May 31 16:04:36 2010
> @@ -18,6 +18,7 @@
>   ~ under the License.
>   -->
>  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> +            targetNamespace="http://apache.org/axis2/schema/chameleon"
>             elementFormDefault="qualified">
>     <xsd:complexType name="SupportingSchemaType">
>         <xsd:sequence>
>
>
>

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


Mime
View raw message