Skip to main content

Boolean type ignored by JaxB Marshaller

1 reply [Last post]
scotey
Offline
Joined: 2005-12-21
Points: 0

I've got a java bean that uses java.lang.* types instead of their java native counterparts. When I'm serializing a bean that looks like this:

@XmlRootElement
public class Parms {
private Boolean cached = null;

public Parms() {
}

public Boolean isCached() {
return cached;
}

public void setCached(boolean value) {
cached = value;
}
}

... the cached value is never serialized to xml, such that I get something like instead of true

I tried changing isCached to read getCached, but that made no difference.

Anyone know what I should do here?

Thanks,

Scott

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
yaroska
Offline
Joined: 2006-05-05
Points: 0

Hi,

Plz try to change Boolean to boolean or vice versa. This would help.

--
Yaroska