You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by Patrick Smith <pa...@redhat.com> on 2005/09/20 15:54:30 UTC

XMLSchema failing with w3.org xml schema

Hi,
My teammate Greg Lapouchnian (who emailed the list yesterday) and I are
trying to get XmlSchema to work with various schemas that are related to
JOnAS (Java Open Application Server), though we aren't having much luck.
As Greg mentioned yesterday, one of the schemas we're trying is
j2ee_1_4.xsd, when we try this schema we get the following stack trace:
org.apache.axis.xsd.xml.schema.XmlSchemaException: No namespace found in
given ref
	at org.apache.axis.xsd.xml.schema.SchemaBuilder.handleAttribute
(SchemaBuilder.java:1271)
	at org.apache.axis.xsd.xml.schema.SchemaBuilder.handleAttributeGroup
(SchemaBuilder.java:1108)
	at org.apache.axis.xsd.xml.schema.SchemaBuilder.handleXmlSchemaElement
(SchemaBuilder.java:112)
	at org.apache.axis.xsd.xml.schema.SchemaBuilder.build
(SchemaBuilder.java:37)
	at org.apache.axis.xsd.xml.schema.XmlSchemaCollection.read
(XmlSchemaCollection.java:172)
	at org.apache.axis.xsd.xml.schema.XmlSchemaCollection.read
(XmlSchemaCollection.java:144)
	at org.apache.axis.xsd.xml.schema.XmlSchemaCollection.read
(XmlSchemaCollection.java:164)
	at org.apache.axis.xsd.xml.schema.TestSchema.main(TestSchema.java:33)

(TestSchema is just a simple class we're using to test XMLSchema with
our schemas)

We traced the problem to the following schema:
http://www.w3.org/2001/xml.xsd

The code throwing this exception is the following:
Object result = schema.namespaces.get(namespaceFromEl[0]);
if (result == null)
 throw new XmlSchemaException("No namespace found in"
              + " given ref");

The schema.namespaces variable contains the following:
{xs=http://www.w3.org/2001/XMLSchema,=http://www.w3.org/XML/1998/namespace}

whereas namespaceFromEl contains:
[xml, base]

And obviously since schema.namespaces doesn't contain 'xml' as a key,
the exception is being thrown.

This schema is imported by j2ee_1_4.xsd, and by every schema we've tried
so far.  We would very much appreciate any help anyone can offer to
resolve this problem.

Thanks.

Patrick Smith



Re: XMLSchema failing with w3.org xml schema

Posted by Jochen Wiedmann <jo...@gmail.com>.
Patrick Smith wrote:

> My teammate Greg Lapouchnian (who emailed the list yesterday) and I are
> trying to get XmlSchema to work with various schemas that are related to
> JOnAS (Java Open Application Server), though we aren't having much luck.

Are you sure, that you are using the right tool? I would consider 
JaxMeXS (http://ws.apache.org/jaxme/xs) to be superior.


Jochen

Re: XMLSchema failing with w3.org xml schema

Posted by Patrick Smith <pa...@redhat.com>.
On Tue, 2005-09-20 at 22:49 -0400, Davanum Srinivas wrote:
> Fixed in latest SVN. FYI, There are package name changes.
> 
> thanks,
> dims

Thanks for your help,
we'll give this a try now.

Patrick Smith


> 
> On 9/20/05, Patrick Smith <pa...@redhat.com> wrote:
> > Hi,
> > My teammate Greg Lapouchnian (who emailed the list yesterday) and I are
> > trying to get XmlSchema to work with various schemas that are related to
> > JOnAS (Java Open Application Server), though we aren't having much luck.
> > As Greg mentioned yesterday, one of the schemas we're trying is
> > j2ee_1_4.xsd, when we try this schema we get the following stack trace:
> > org.apache.axis.xsd.xml.schema.XmlSchemaException: No namespace found in
> > given ref
> >         at org.apache.axis.xsd.xml.schema.SchemaBuilder.handleAttribute
> > (SchemaBuilder.java:1271)
> >         at org.apache.axis.xsd.xml.schema.SchemaBuilder.handleAttributeGroup
> > (SchemaBuilder.java:1108)
> >         at org.apache.axis.xsd.xml.schema.SchemaBuilder.handleXmlSchemaElement
> > (SchemaBuilder.java:112)
> >         at org.apache.axis.xsd.xml.schema.SchemaBuilder.build
> > (SchemaBuilder.java:37)
> >         at org.apache.axis.xsd.xml.schema.XmlSchemaCollection.read
> > (XmlSchemaCollection.java:172)
> >         at org.apache.axis.xsd.xml.schema.XmlSchemaCollection.read
> > (XmlSchemaCollection.java:144)
> >         at org.apache.axis.xsd.xml.schema.XmlSchemaCollection.read
> > (XmlSchemaCollection.java:164)
> >         at org.apache.axis.xsd.xml.schema.TestSchema.main(TestSchema.java:33)
> > 
> > (TestSchema is just a simple class we're using to test XMLSchema with
> > our schemas)
> > 
> > We traced the problem to the following schema:
> > http://www.w3.org/2001/xml.xsd
> > 
> > The code throwing this exception is the following:
> > Object result = schema.namespaces.get(namespaceFromEl[0]);
> > if (result == null)
> >  throw new XmlSchemaException("No namespace found in"
> >               + " given ref");
> > 
> > The schema.namespaces variable contains the following:
> > {xs=http://www.w3.org/2001/XMLSchema,=http://www.w3.org/XML/1998/namespace}
> > 
> > whereas namespaceFromEl contains:
> > [xml, base]
> > 
> > And obviously since schema.namespaces doesn't contain 'xml' as a key,
> > the exception is being thrown.
> > 
> > This schema is imported by j2ee_1_4.xsd, and by every schema we've tried
> > so far.  We would very much appreciate any help anyone can offer to
> > resolve this problem.
> > 
> > Thanks.
> > 
> > Patrick Smith
> > 
> > 
> > 
> 
> 


Re: XMLSchema failing with w3.org xml schema

Posted by Davanum Srinivas <da...@gmail.com>.
Fixed in latest SVN. FYI, There are package name changes.

thanks,
dims

On 9/20/05, Patrick Smith <pa...@redhat.com> wrote:
> Hi,
> My teammate Greg Lapouchnian (who emailed the list yesterday) and I are
> trying to get XmlSchema to work with various schemas that are related to
> JOnAS (Java Open Application Server), though we aren't having much luck.
> As Greg mentioned yesterday, one of the schemas we're trying is
> j2ee_1_4.xsd, when we try this schema we get the following stack trace:
> org.apache.axis.xsd.xml.schema.XmlSchemaException: No namespace found in
> given ref
>         at org.apache.axis.xsd.xml.schema.SchemaBuilder.handleAttribute
> (SchemaBuilder.java:1271)
>         at org.apache.axis.xsd.xml.schema.SchemaBuilder.handleAttributeGroup
> (SchemaBuilder.java:1108)
>         at org.apache.axis.xsd.xml.schema.SchemaBuilder.handleXmlSchemaElement
> (SchemaBuilder.java:112)
>         at org.apache.axis.xsd.xml.schema.SchemaBuilder.build
> (SchemaBuilder.java:37)
>         at org.apache.axis.xsd.xml.schema.XmlSchemaCollection.read
> (XmlSchemaCollection.java:172)
>         at org.apache.axis.xsd.xml.schema.XmlSchemaCollection.read
> (XmlSchemaCollection.java:144)
>         at org.apache.axis.xsd.xml.schema.XmlSchemaCollection.read
> (XmlSchemaCollection.java:164)
>         at org.apache.axis.xsd.xml.schema.TestSchema.main(TestSchema.java:33)
> 
> (TestSchema is just a simple class we're using to test XMLSchema with
> our schemas)
> 
> We traced the problem to the following schema:
> http://www.w3.org/2001/xml.xsd
> 
> The code throwing this exception is the following:
> Object result = schema.namespaces.get(namespaceFromEl[0]);
> if (result == null)
>  throw new XmlSchemaException("No namespace found in"
>               + " given ref");
> 
> The schema.namespaces variable contains the following:
> {xs=http://www.w3.org/2001/XMLSchema,=http://www.w3.org/XML/1998/namespace}
> 
> whereas namespaceFromEl contains:
> [xml, base]
> 
> And obviously since schema.namespaces doesn't contain 'xml' as a key,
> the exception is being thrown.
> 
> This schema is imported by j2ee_1_4.xsd, and by every schema we've tried
> so far.  We would very much appreciate any help anyone can offer to
> resolve this problem.
> 
> Thanks.
> 
> Patrick Smith
> 
> 
> 


-- 
Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service Platform