Ajith,
I forgot to send this to the commons-dev list too.

John.

On 4/2/07, John Kaputin <[EMAIL PROTECTED]> wrote:

Ajith,
here's a likely fix. SchemaBuilder.handleXmlSchemaElement method calls the
handleImport method and adds the result to the 'includes' collection. In
1.2, a XmlSchemaImport object is always returned by handleImport. In 1.3
the handleImport method might return a null, but this null is still added
to the collection.

SchemaBuilder.handleXmlSchemaElement
XmlSchemaImport schemaImport = handleImport(schema,
        el, schemaEl);
schema.includes.add(schemaImport);

SchemaBuilder.handleImport
v1.2:  return schemaImport;
v1.3:  return (schemaImport.schema == null) ? null : schemaImport;

Maybe it needs a null check before adding the result to the collection?
The following patch fixed the regressions in the Woden test suite.



regards,
John Kaputin


John Kaputin/UK/[EMAIL PROTECTED] wrote on 02/04/2007 18:09:11:

> No problem Ajith. I didn't realize until after I had committed the
> workaround that it just masked the problem.
>
> John Kaputin
>
>
> "Ajith Ranabahu" <[EMAIL PROTECTED]> wrote on 02/04/2007
17:55:44:
>
> > Hi,
> > Ok - will do some testing with the M7a branch and let you know - sorry
> > I had no idea that you've made the workaround with the trunk (I know -
> >  I should've gone through the commit messages)
> >
> > Ajith
> >
> > On 4/2/07, John Kaputin <[EMAIL PROTECTED]> wrote:
> > > Ajith,
> > > same problem with XmSchema 1.3 RC2. It appeared to be OK with Woden
> trunk
> > > because I had added a workaround to ComponentModelBuilder that
checked
> for
> > > null before attempt to use the XmlSchemaExternal object returned by
> > > getIncludes() - this object is present with XmlSchema 1.2 but null
> with
> > > XmlSchema 1.3.  However, this workaround just masks the problem
which
> is
> > > that some of the imported schema components are missing with
XmlSchema
> > > 1.3.
> > >
> > > I have now removed this workaround from Woden trunk and created a
> branch
> > > WodenM7a instead to use for this interim Woden release required by
> Axis2
> > > 1.2. I will do some more investigation on this today.
> > >
> > > John Kaputin
> > >
> > >
> > > "Ajith Ranabahu" <[EMAIL PROTECTED]> wrote on 01/04/2007
> 15:23:49:
> > >
> > > > Hi,
> > > > Any updates on the XMLSchema RC2 ?
> > > >
> > > > On 3/30/07, Ajith Ranabahu <[EMAIL PROTECTED]> wrote:
> > > > > Hi,
> > > > > It seems that the ordering of a certain statement could have
been
> the
> > > > > problem.I've fixed the issue ran the latest woden code against
it
> > > > > (Running the maven build should take care of everything ?) and
the
> > > > > build succeeds. I've posted RC2 at the same location.
> > > > >
> > > > > Please let me know of any further issues.
> > > > >
> > > > > Ajith
> > > > >
> > > > > On 3/30/07, John Kaputin (gmail) <[EMAIL PROTECTED]> wrote:
> > > > > > Ajith,
> > > > > >  the description of the problem in my previous email needs to
> > > becorrected.
> > > > > > In the Woden code fragment shown in that email, the
> > > > externalSchema variable
> > > > > > is null, hence the NPE (i.e. the NPE is not thrown within the
> > > getSchema()
> > > > > > method).  It seems like the XmlSchemaObjectCollection returned

> by
> > > the
> > > > > > getIncludes() method contains nulls.
> > > > > >
> > > > > >  The code fragment below shows a work around I can use in
Woden
> that
> > > fixes
> > > > > > the NPEs, but I'd still like to know if the null values in the
> > > > collection is
> > > > > > a new error.
> > > > > >
> > > > > >          //process elements and types declared in any included

> or
> > > imported
> > > > > > schemas.
> > > > > >          //note that XmlSchema keeps included and imported
> > > > schemas together,
> > > > > > via getIncludes().
> > > > > >
> > > > > >          XmlSchemaObjectCollection includeColl =
> > > schemaDef.getIncludes();
> > > > > >          Iterator includes = includeColl.getIterator();
> > > > > >          while(includes.hasNext()) {
> > > > > >              Object o = includes.next();
> > > > > >              XmlSchemaExternal externalSchema =
> > > (XmlSchemaExternal)o;
> > > > > >              XmlSchema schema = null;
> > > > > >              if(externalSchema != null) {
> > > > > >                  schema = externalSchema.getSchema();
> > > > > >              }
> > > > > >
> > > > > >  Let me know if this looks like it requires a JIRA against
> > > XmlSchema.
> > > > > >
> > > > > >  regards
> > > > > >  John Kaputin.
> > > > > >
> > > > > >
> > > > > > On 3/30/07, John Kaputin (gmail) <[EMAIL PROTECTED]> wrote:
> > > > > > > Ajith,
> > > > > > > Woden has 5 test case failures when using XmlSchema 1.3 RC1.
> > > > These were OK
> > > > > > with XmlSchema 1.2.  All 5 test cases contain <xs:import>
> > > > statements and the
> > > > > > NPE occurs when Woden calls the XmlSchemaExternal.getSchema()
> > > method.
> > > > > > >
> > > > > > > Here's the code fragment from Woden's ComponentModelBuilder
> class
> > > where
> > > > > > the NPE occurs:
> > > > > > >
> > > > > > >         //process elements and types declared in any
included
> > > > or imported
> > > > > > schemas.
> > > > > > >         //note that XmlSchema keeps included and imported
> schemas
> > > > > > together, via getIncludes().
> > > > > > >
> > > > > > >         XmlSchemaObjectCollection includeColl =
> > > schemaDef.getIncludes();
> > > > > > >         Iterator includes = includeColl.getIterator();
> > > > > > >         while(includes.hasNext()) {
> > > > > > >             Object o = includes.next();
> > > > > > >             XmlSchemaExternal externalSchema =
> > > (XmlSchemaExternal)o;
> > > > > > >             XmlSchema schema = externalSchema.getSchema();
> > > > << NPE, line
> > > > > > 240
> > > > > > >
> > > > > > > Woden registers its own implementation of
> > > > > > org.apache.ws.commons.schema.resolver.URIResolver with
> > > > > > XmlSchemaCollection to assist with resolving schema imports.
> > > > Maybe something
> > > > > > has changed in the way URIResolver implementations are used
> within
> > > > > > XmlSchema?
> > > > > > >
> > > > > > > I have not debugged into XmlSchema yet but will let you know

> or
> > > raise a
> > > > > > JIRA if I find anything.
> > > > > > >
> > > > > > > The 5 failing test cases are:
> > > > > > >
> > > > > > >
> > > > > > http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-
> > > > suite/documents/good/MultipleInlineSchemas-1G/retrieveItems.wsdl
> > > > > > >
> > > > > > >
> > > > > > http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-
> > > > suite/documents/good/ServiceReference-1G/reservationList.wsdl
> > > > > > >
> > > > > > >
> > > > > > http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-
> > > > suite/documents/good/XsImport-1G/reservation.wsdl
> > > > > > >
> > > > > > >
> > > > > > http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-
> > > > suite/documents/good/XsImport-2G/reservationDetails.wsdl
> > > > > > >
> > > > > > >
> > > > > > http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-
> > > > suite/documents/good/XsImport-3G/reservationDetails.wsdl
> > > > > > >
> > > > > > >
> > > > > > > regards,
> > > > > > > John Kaputin.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On 3/30/07, Ajith Ranabahu <[EMAIL PROTECTED] >
wrote:
> > > > > > > > Hi all,
> > > > > > > > I've completed the newly added features, added test cases
> for
> > > all the
> > > > > > > > new features and published the RC jars at [1]. Please
check
> out
> > > this
> > > > > > > > release and report any errors. Note that I've taken the
> version
> > > number
> > > > > > > > 1.3 due to the new feature addition.
> > > > > > > > Meanwhile there are 10 jiras for XMLSchema, many without
any
> > > details
> > > > > > > > of how to recreate the problem or a sample schema that
> > > demonstrates
> > > > > > > > the issue. It is appreciated if the reporters can add a
bit
> more
> > > > > > > > information and help us resolve the issues for this
release.
> > > > > > > >
> > > > > > > > Thanks
> > > > > > > > --
> > > > > > > > Ajith Ranabahu
> > > > > > > >
> > > > > > > >
> > > > > > > > [1] http://people.apache.org/~ajith/xmlschema/
> > > > > > > >
> > > > > > > >
> > > > > >
> > >
---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> > > > > > [EMAIL PROTECTED]
> > > > > > > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Ajith Ranabahu
> > > > >
> > > >
> > > >
> > > > --
> > > > Ajith Ranabahu
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Unless stated otherwise above:
> > > IBM United Kingdom Limited - Registered in England and Wales with
> number
> > > 741598.
> > > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire
PO6
> 3AU
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > Ajith Ranabahu
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
>
>
>
>
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number

> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>






Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to