• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JAXB: transforming beans into XML

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey, I am having hard time with jaxb...
I have quite advanced structure of Beans (logicbeans), that are using other beans (persistencebeans), so there are generally no properties in logicbeans. (logicbeans are the ones iI need to transform). Additionally logicbeans base on interfaces and use interfaces and have big inheritance tree . Logic beans are "done", but luckily I can modify them, but not too much (best if only by adding jaxb annotations).

First problem was, that jaxb needed an no arg constructor. For now i made a mock constructor, but I expected, that it will be possible simply to write own ObjectFactory, where I will by myself create these object (also quite complicated thing, but not for now). So it is possible to avoid this noarg argument?

Second, much worse at this point, after I reduced amount of jaxb error by creating no arg constructors, now i see this:

logicbeans.InternalContentLogicBeanFactory is an interface, and JAXB can't handle interfaces.


I don't want jaxb to do anything with that, in one of inherited classes I have this:

Putting there XmlTransient doesnt help...

Any ideas?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic