File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes JAXB can't handle interfaces. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "JAXB can Watch "JAXB can New topic

JAXB can't handle interfaces.

El El

Joined: Aug 14, 2007
Posts: 1

I have a problem with jaxb and I was wondering if someone came across with it:
I have a class (class Car) that implements an interface (interface CarIfc), and I want to be able to marshall and unmarshall the Car class.
when activating the JaxbMarshaller, I get the following error:
Car is an interface, and JAXB can't handle interfaces.
do you have any idea how can I use interfaces in JAXB?
If not, is there any other XML framework that handles interfaces?

thanks in advance
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

"El El", please check your private messages for an important moderator message. (To see your private messages, click on the "get_profile" icon, that's the first of the little icons at the top of your post, and go from there.)
I agree. Here's the link:
subject: JAXB can't handle interfaces.
It's not a secret anymore!