Ajith,
the description of the problem in my previous email needs to be corrected.
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/%7Echeckout%7E/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/%7Echeckout%7E/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/%7Echeckout%7E/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/%7Echeckout%7E/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

<http://dev.w3.org/cvsweb/%7Echeckout%7E/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/<http://people.apache.org/%7Eajith/xmlschema/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to