Problem in XJC with recognizing jaxb: prefix

Discussion in 'Java' started by Asra, Oct 26, 2004.

  1. Asra

    Asra Guest

    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
    Asra, Oct 26, 2004
    #1
    1. Advertising

  2. Asra

    Sudsy Guest

    Asra wrote:
    <snip>
    > 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.

    --
    Java/J2EE/JSP/Struts/Tiles/C/UNIX consulting and remote development.
    Sudsy, Oct 26, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert Reeves
    Replies:
    0
    Views:
    1,248
    Robert Reeves
    Nov 11, 2005
  2. jaxb xjc problem

    , Jan 8, 2006, in forum: Java
    Replies:
    1
    Views:
    4,358
    SimonJackson
    Jan 18, 2006
  3. Replies:
    0
    Views:
    2,270
  4. frank

    jaxb/xjc binding issue

    frank, Sep 7, 2006, in forum: Java
    Replies:
    0
    Views:
    1,207
    frank
    Sep 7, 2006
  5. pinguin
    Replies:
    0
    Views:
    1,012
    pinguin
    Dec 20, 2007
Loading...

Share This Page