This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes JaxB Compile Error: Failed to read imported schema document Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "JaxB Compile Error: Failed to read imported schema document" Watch "JaxB Compile Error: Failed to read imported schema document" New topic
Author

JaxB Compile Error: Failed to read imported schema document

Yair Ogen
Greenhorn

Joined: Feb 12, 2003
Posts: 29
hi i'm trying to compile the CD_DataBase.xsd schema (using the JaxB that I got from the JWSDP found at Sun's site) which references to an Album element in Album.xsd
For some reason, my xjc task falls when trying to read the imported schema.
here are the schemas':
---------------------------------------------------
Album.xsd
---------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.bll.co.il"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
jaxb:extensionBindingPrefixes="xjc"
jaxb:version="1.0"
elementFormDefault="qualified">
<xsd:annotation>
<xsd:appinfo>
<jaxb:globalBindings>
<xjc:serializable/>
</jaxb:globalBindings>
</xsd:appinfo>
</xsd:annotation>
<xsd:element name="album">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="description" type="xsd:string"/>
<xsd:element name="producer" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
---------------------------------------------------
CD_DataBase.xsd
---------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.bll.com"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
xmlns:alb="http://www.bll.co.il"
xmlns:cd="http://www.bll.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
jaxb:extensionBindingPrefixes="xjc"
jaxb:version="1.0"
elementFormDefault="qualified">
<xsd:import namespace="http://www.bll.co.il" schemaLocation="Album.xsd"/>
<xsd:annotation>
<xsd:appinfo>
<jaxb:globalBindings>
<xjc:serializable/>
</jaxb:globalBindings>
</xsd:appinfo>
</xsd:annotation>
<xsd:element name="CD">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="artist" type="xsd:string"/>
<xsd:element ref="alb:album"/>
</xsd:sequence>
<xsd:attribute name="title" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
</xsd:schema>
can any one help?
even if it works, will jaxb compilr the referenced schema (album.xsd) to java classes every time i use it (in other schemas' that are using it)?
Thank's,


Regards,<br /> <br />Yair Ogen
 
Don't get me started about those stupid light bulbs.
 
subject: JaxB Compile Error: Failed to read imported schema document
 
Similar Threads
xml validation with the java 5
Different Schemas using com.sun.tools.xjc.maven2
xmlmime - include content type
JAXB 1.0 External Binding Customization: Binding Duplicate Elements in XML Schema
Error creatin Top down web service with Eclipse Helios