Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JAXB: XJC src-resolve error when importing other schemes

843834Mar 30 2006 — edited Apr 3 2006
Hi!


I keep getting a src-resolve error from the JAXB binding compiler whenever I try to import other XML schemes into my own.

For example:
I want to use a SignatureType element as defined in the official XML signature schema.
So I imported it into my own schema and use it as follows:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:ds="http://www.w3.org/2000/09/xmldsig#">

<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" 
schemaLocation="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd"/>

...
<xsd:complexType name="PayloadType">
 <xsd:sequence>
  ...
   <xsd:element name="signature" type="ds:SignatureType" minOccurs="0"/>
  ...
 </xsd:sequence>
</xsd:complexType>
However if I run XJC to compile my schema I get this error:
[xjc] [ERROR] src-resolve: Cannot resolve the name 'ds:SignatureType' to a(n) 'type definition' component.
I am using JAXB 2.0 EA from the JWSDP 2.0 and XJC is called from an Ant task.

I am pretty new to JAXB and XML schemes, so any help on this topic would be greatly appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 1 2006
Added on Mar 30 2006
1 comment
1,716 views