Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Problem in XJC with recognizing jaxb: prefix

Reply
Thread Tools

Problem in XJC with recognizing jaxb: prefix

 
 
Asra
Guest
Posts: n/a
 
      10-26-2004
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.prin tShort"
parseMethod="javax.xml.bind.DatatypeConverter.pars eShort"/>
</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 jaxbroperty or
anything.
Can anybody point out what I'm missing?
Thanks,
Asra Baig
 
Reply With Quote
 
 
 
 
Sudsy
Guest
Posts: n/a
 
      10-26-2004
Asra wrote:
<snip>
> It says that wherever I use jaxb, whether in jaxbroperty 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. xmlnss) and
add the above attribute to the end.

--
Java/J2EE/JSP/Struts/Tiles/C/UNIX consulting and remote development.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
removing a namespace prefix and removing all attributes not in that same prefix Chris Chiasson XML 6 11-14-2006 05:08 PM
jaxb xjc problem asaf.lahav@gmail.com Java 1 01-18-2006 11:37 AM
"static" prefix - to parallel "this" prefix Tim Tyler Java 36 12-10-2004 01:02 AM
NoClassDefFoundError Files.Symantec.Norton with xjc tool Asra Java 1 10-20-2004 11:41 AM
Recognizing / Not Recognizing the Disk Drives Bill Coleman Computer Support 1 05-31-2004 07:36 AM



Advertisments