DevOps Automation

DevOps Automation

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#DevOps
 View Only
Expand all | Collapse all

JAXB generates root element with lower case while marshalling

  • 1.  JAXB generates root element with lower case while marshalling

    Posted Sun September 05, 2010 09:52 PM

    Hi


     


    I am trying to store the an incoming request and I am using JAXB to marshall the object to xml. After marshalling root element it appears the root element get generated with lower case.


     



    txLifeRequestType xmlns:ns2="http://ACORD.org/Standards/Life/2">
     


     just because of this , while unmarshalling i am getting exception saying that expected element is not there.


    Please let me know if you guys have encountered this issue and solved it,



  • 2.  JAXB generates root element with lower case while marshalling

    Posted Sun September 05, 2010 10:37 PM

    this issue is solved and as i have added this to the classes


     


    @XmlRootElement(name="TXLifeRequestType")



  • 3.  JAXB generates root element with lower case while marshalling

    Posted Fri April 20, 2012 12:25 AM
    There are many other useful annotations in this family too.  Here is a useful reference:

    docs.oracle.com/javaee/5/api/javax/xml/b...