You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by Ajith Ranabahu <aj...@gmail.com> on 2007/10/23 06:11:17 UTC

[XMLSchema] [Vote] Time for a release !

Hi all,
I have branched the XMLSchema trunk (
http://svn.apache.org/viewvc/webservices/commons/branches/modules/XmlSchema/1.3.3/
) and posted the candidate artifacts at
http://people.apache.org/~ajith/xmlschema/. Please take a look, try
them out and report any concerns in the mailing list.

I have fixed about 7 Jiras (as I felt important) but kept two of them
unresolved. Issues 264 and 265 are fixed in the code but may need more
discussion (perhaps from the tuscany folks) to be marked as resolved.
Relevance of other issues is somewhat questionable so I left them
unchanged.

Here is my +1 for the release.

-- 
Ajith Ranabahu

Reading, after a certain age, diverts the mind too much from its
creative pursuits. Any man who reads too much and uses his own brain
too little falls into lazy habits of thinking - Albert Einstein

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


Re: [XMLSchema] [Vote] Time for a release !

Posted by "John Kaputin (gmail)" <ja...@gmail.com>.
The Woden tests (including the W3C WSDL 2.0 test suite) ran okay using this
build, but following Amila's post I did a further simple recursive test
(schema1 imports schema2 imports schema1) and saw looping behaviour on the
getTypeByName method.

Here's a fragment from the stack trace:
    at org.apache.ws.commons.schema.XmlSchema.getTypeByName(XmlSchema.java
:177)
    at org.apache.ws.commons.schema.XmlSchema.getTypeByName(XmlSchema.java
:177)
    at org.apache.ws.commons.schema.XmlSchema.getTypeByName(XmlSchema.java
:177)
    at org.apache.ws.commons.schema.XmlSchema.getTypeByName(XmlSchema.java
:177)
    at org.apache.ws.commons.schema.XmlSchemaCollection.getTypeByQName(
XmlSchemaCollection.java:470)
    at org.apache.ws.commons.schema.SchemaBuilder.handleElement(
SchemaBuilder.java:1336)
    at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(
SchemaBuilder.java:169)
    at org.apache.ws.commons.schema.XmlSchemaCollection.read(
XmlSchemaCollection.java:406)
    at jktest.XmlSchemaTest.main(XmlSchemaTest.java:42)

John Kaputin.



On 10/23/07, Amila Suriarachchi <am...@gmail.com> wrote:
>
> same thing applies to
> public XmlSchemaElement getElementByName(QName name)
>
> method as well.
>
> Amila.
>
> On 10/23/07, Amila Suriarachchi <am...@gmail.com> wrote:
> >
> > hi ajith,
> >
> > did you change this method recently in XmlSchema.
> >
> > public XmlSchemaType getTypeByName(QName name) {
> >         XmlSchemaType type = (XmlSchemaType) schemaTypes.getItem(name);
> >         if (type == null){
> >             //search the imports
> >             for(Iterator includedItems = includes.getIterator
> > ();includedItems.hasNext();){
> >                 Object includeOrImport =  includedItems.next();
> >                 XmlSchema schema = null;
> >                 if (includeOrImport instanceof XmlSchemaImport){
> >                     schema  =
> > ((XmlSchemaImport)includeOrImport).getSchema();
> >                 }else if (includeOrImport instanceof XmlSchemaInclude){
> >                     schema  =
> > ((XmlSchemaInclude)includeOrImport).getSchema();
> >                 }else{
> >                     //skip ?
> >                     continue;
> >                 }
> >
> >                 if ( schema.getTypeByName(name)!=null){
> >                     return schema.getTypeByName(name);
> >                 }
> >             }
> >         }else{
> >             return type;
> >         }
> >
> >         return null;
> >     }
> >
> > Earlier it does not search for imported and included schemas.
> > As I see this method has two problems.
> > 1. the imported schema may be null if we have inline schemas in a wsdl.
> so
> > there can be a null pointer
> > exception
> > 2. what about the recuresive imports?
> > if there are two scheams with imports each other and if we try to find a
> > Type which is not exists (or exists in anther import) there may be an
> > endless loop.
> >
> > Any way the biggest problem is this breaks ADB.
> > ADB Schema Compiler needs to keep the track of the parent schema. So
> what
> > it does is
> > it find it in available imports and includes if a Type does not exists
> in
> > a given schema. (as you have done).
> >
> > This way it can not track the parent schema.
> >
> > So shall we add a another parameter to preserve this functionality.
> > i.e.
> > public XmlSchemaType getTypeByName(QName name, boolean isDeepSearch)
> >
> > Amila.
> >
> >
> > On 10/23/07, Ruwan Linton <ru...@gmail.com> wrote:
> > >
> > > We have tested this with the Synapse build and it is working fine.
> > >
> > > +1 for the release.
> > >
> > > Thanks,
> > > Ruwan
> > >
> > > On 10/23/07, Ajith Ranabahu <ajith.ranabahu@gmail.com > wrote:
> > > >
> > > > Hi all,
> > > > I have branched the XMLSchema trunk (
> > > >
> > > >
> http://svn.apache.org/viewvc/webservices/commons/branches/modules/XmlSchema/1.3.3/
> > >
> > > > ) and posted the candidate artifacts at
> > > > http://people.apache.org/~ajith/xmlschema/<
> http://people.apache.org/%7Eajith/xmlschema/>.
> > > Please take a look, try
> > > > them out and report any concerns in the mailing list.
> > > >
> > > > I have fixed about 7 Jiras (as I felt important) but kept two of
> them
> > > > unresolved. Issues 264 and 265 are fixed in the code but may need
> more
> > > > discussion (perhaps from the tuscany folks) to be marked as
> resolved.
> > > > Relevance of other issues is somewhat questionable so I left them
> > > > unchanged.
> > > >
> > > > Here is my +1 for the release.
> > > >
> > > > --
> > > > Ajith Ranabahu
> > > >
> > > > Reading, after a certain age, diverts the mind too much from its
> > > > creative pursuits. Any man who reads too much and uses his own brain
> > > > too little falls into lazy habits of thinking - Albert Einstein
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: commons-dev-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Ruwan Linton
> > > http://www.wso2.org - "Oxygenating the Web Services Platform"
> > >
> >
> >
> >
> > --
> > Amila Suriarachchi,
> > WSO2 Inc.
>
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>

Re: [XMLSchema] [Vote] Time for a release !

Posted by Amila Suriarachchi <am...@gmail.com>.
same thing applies to
public XmlSchemaElement getElementByName(QName name)

method as well.

Amila.

On 10/23/07, Amila Suriarachchi <am...@gmail.com> wrote:
>
> hi ajith,
>
> did you change this method recently in XmlSchema.
>
> public XmlSchemaType getTypeByName(QName name) {
>         XmlSchemaType type = (XmlSchemaType) schemaTypes.getItem(name);
>         if (type == null){
>             //search the imports
>             for(Iterator includedItems = includes.getIterator
> ();includedItems.hasNext();){
>                 Object includeOrImport =  includedItems.next();
>                 XmlSchema schema = null;
>                 if (includeOrImport instanceof XmlSchemaImport){
>                     schema  =
> ((XmlSchemaImport)includeOrImport).getSchema();
>                 }else if (includeOrImport instanceof XmlSchemaInclude){
>                     schema  =
> ((XmlSchemaInclude)includeOrImport).getSchema();
>                 }else{
>                     //skip ?
>                     continue;
>                 }
>
>                 if ( schema.getTypeByName(name)!=null){
>                     return schema.getTypeByName(name);
>                 }
>             }
>         }else{
>             return type;
>         }
>
>         return null;
>     }
>
> Earlier it does not search for imported and included schemas.
> As I see this method has two problems.
> 1. the imported schema may be null if we have inline schemas in a wsdl. so
> there can be a null pointer
> exception
> 2. what about the recuresive imports?
> if there are two scheams with imports each other and if we try to find a
> Type which is not exists (or exists in anther import) there may be an
> endless loop.
>
> Any way the biggest problem is this breaks ADB.
> ADB Schema Compiler needs to keep the track of the parent schema. So what
> it does is
> it find it in available imports and includes if a Type does not exists in
> a given schema. (as you have done).
>
> This way it can not track the parent schema.
>
> So shall we add a another parameter to preserve this functionality.
> i.e.
> public XmlSchemaType getTypeByName(QName name, boolean isDeepSearch)
>
> Amila.
>
>
> On 10/23/07, Ruwan Linton <ru...@gmail.com> wrote:
> >
> > We have tested this with the Synapse build and it is working fine.
> >
> > +1 for the release.
> >
> > Thanks,
> > Ruwan
> >
> > On 10/23/07, Ajith Ranabahu <ajith.ranabahu@gmail.com > wrote:
> > >
> > > Hi all,
> > > I have branched the XMLSchema trunk (
> > >
> > > http://svn.apache.org/viewvc/webservices/commons/branches/modules/XmlSchema/1.3.3/
> >
> > > ) and posted the candidate artifacts at
> > > http://people.apache.org/~ajith/xmlschema/<http://people.apache.org/%7Eajith/xmlschema/>.
> > Please take a look, try
> > > them out and report any concerns in the mailing list.
> > >
> > > I have fixed about 7 Jiras (as I felt important) but kept two of them
> > > unresolved. Issues 264 and 265 are fixed in the code but may need more
> > > discussion (perhaps from the tuscany folks) to be marked as resolved.
> > > Relevance of other issues is somewhat questionable so I left them
> > > unchanged.
> > >
> > > Here is my +1 for the release.
> > >
> > > --
> > > Ajith Ranabahu
> > >
> > > Reading, after a certain age, diverts the mind too much from its
> > > creative pursuits. Any man who reads too much and uses his own brain
> > > too little falls into lazy habits of thinking - Albert Einstein
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: commons-dev-help@ws.apache.org
> > >
> > >
> >
> >
> > --
> > Ruwan Linton
> > http://www.wso2.org - "Oxygenating the Web Services Platform"
> >
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.




-- 
Amila Suriarachchi,
WSO2 Inc.

Re: [XMLSchema] [Vote] Time for a release !

Posted by Amila Suriarachchi <am...@gmail.com>.
hi ajith,

did you change this method recently in XmlSchema.

public XmlSchemaType getTypeByName(QName name) {
        XmlSchemaType type = (XmlSchemaType) schemaTypes.getItem(name);
        if (type == null){
            //search the imports
            for(Iterator includedItems = includes.getIterator
();includedItems.hasNext();){
                Object includeOrImport =  includedItems.next();
                XmlSchema schema = null;
                if (includeOrImport instanceof XmlSchemaImport){
                    schema  =
((XmlSchemaImport)includeOrImport).getSchema();
                }else if (includeOrImport instanceof XmlSchemaInclude){
                    schema  =
((XmlSchemaInclude)includeOrImport).getSchema();
                }else{
                    //skip ?
                    continue;
                }

                if (schema.getTypeByName(name)!=null){
                    return schema.getTypeByName(name);
                }
            }
        }else{
            return type;
        }

        return null;
    }

Earlier it does not search for imported and included schemas.
As I see this method has two problems.
1. the imported schema may be null if we have inline schemas in a wsdl. so
there can be a null pointer
exception
2. what about the recuresive imports?
if there are two scheams with imports each other and if we try to find a
Type which is not exists (or exists in anther import) there may be an
endless loop.

Any way the biggest problem is this breaks ADB.
ADB Schema Compiler needs to keep the track of the parent schema. So what it
does is
it find it in available imports and includes if a Type does not exists in a
given schema. (as you have done).

This way it can not track the parent schema.

So shall we add a another parameter to preserve this functionality.
i.e.
public XmlSchemaType getTypeByName(QName name, boolean isDeepSearch)

Amila.


On 10/23/07, Ruwan Linton <ru...@gmail.com> wrote:
>
> We have tested this with the Synapse build and it is working fine.
>
> +1 for the release.
>
> Thanks,
> Ruwan
>
> On 10/23/07, Ajith Ranabahu <aj...@gmail.com> wrote:
> >
> > Hi all,
> > I have branched the XMLSchema trunk (
> >
> >
> http://svn.apache.org/viewvc/webservices/commons/branches/modules/XmlSchema/1.3.3/
> > ) and posted the candidate artifacts at
> > http://people.apache.org/~ajith/xmlschema/. Please take a look, try
> > them out and report any concerns in the mailing list.
> >
> > I have fixed about 7 Jiras (as I felt important) but kept two of them
> > unresolved. Issues 264 and 265 are fixed in the code but may need more
> > discussion (perhaps from the tuscany folks) to be marked as resolved.
> > Relevance of other issues is somewhat questionable so I left them
> > unchanged.
> >
> > Here is my +1 for the release.
> >
> > --
> > Ajith Ranabahu
> >
> > Reading, after a certain age, diverts the mind too much from its
> > creative pursuits. Any man who reads too much and uses his own brain
> > too little falls into lazy habits of thinking - Albert Einstein
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: commons-dev-help@ws.apache.org
> >
> >
>
>
> --
> Ruwan Linton
> http://www.wso2.org - "Oxygenating the Web Services Platform"
>



-- 
Amila Suriarachchi,
WSO2 Inc.

Re: [XMLSchema] [Vote] Time for a release !

Posted by Ruwan Linton <ru...@gmail.com>.
We have tested this with the Synapse build and it is working fine.

+1 for the release.

Thanks,
Ruwan

On 10/23/07, Ajith Ranabahu <aj...@gmail.com> wrote:
>
> Hi all,
> I have branched the XMLSchema trunk (
>
> http://svn.apache.org/viewvc/webservices/commons/branches/modules/XmlSchema/1.3.3/
> ) and posted the candidate artifacts at
> http://people.apache.org/~ajith/xmlschema/. Please take a look, try
> them out and report any concerns in the mailing list.
>
> I have fixed about 7 Jiras (as I felt important) but kept two of them
> unresolved. Issues 264 and 265 are fixed in the code but may need more
> discussion (perhaps from the tuscany folks) to be marked as resolved.
> Relevance of other issues is somewhat questionable so I left them
> unchanged.
>
> Here is my +1 for the release.
>
> --
> Ajith Ranabahu
>
> Reading, after a certain age, diverts the mind too much from its
> creative pursuits. Any man who reads too much and uses his own brain
> too little falls into lazy habits of thinking - Albert Einstein
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: commons-dev-help@ws.apache.org
>
>


-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"