Problem in XJC with recognizing jaxb: prefix

A

Asra

Hello,
I'm using xjc to compile XML Schema into JAXB objects and the
compiling is fine unless I try to define jaxb bindings. For instance,
if I try adding this code in the schema:
<xs:annotation>
<xs:appinfo>
<jaxb:globalBindings generateIsSetMethod="true">
bindingStyle="modelGroupBinding"
choiceContentProperty="true" >

<xjc:serializable uid="12343"/>
<jaxb:javaType name="short"
xmlType="xs:long"
printMethod="javax.xml.bind.DatatypeConverter.printShort"
parseMethod="javax.xml.bind.DatatypeConverter.parseShort"/>
</jaxb:globalBindings>
</xs:appinfo>
</xs:annotation>
xjc complains with:
[ERROR] The prefix "jaxb" for element "jaxb:globalBindings" is not
bound.

It says that wherever I use jaxb, whether in jaxb:property or
anything.
Can anybody point out what I'm missing?
Thanks,
Asra Baig
 
S

Sudsy

Asra wrote:
It says that wherever I use jaxb, whether in jaxb:property or
anything.
Can anybody point out what I'm missing?
Thanks,
Asra Baig

Missing namespace declaration. There should be something like this:
xmlns:jaxb="URI"
Just look for the other namespace definitions (i.e. xmlns:xs) and
add the above attribute to the end.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top