File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JaxB Compile Error: Failed to read imported schema document
 
Similar Threads
JAXB 1.0 External Binding Customization: Binding Duplicate Elements in XML Schema
xmlmime - include content type
Different Schemas using com.sun.tools.xjc.maven2
xml validation with the java 5
Error creatin Top down web service with Eclipse Helios