users@jersey.java.net

[Jersey] Enforcing non null fields with moxy

From: Piers Powlesland <piers_at_aptusinteractive.com>
Date: Mon, 10 Feb 2014 12:44:11 +0000

Hi, I'm trying to use moxy to marshall/unmarshall pojo's between a jersey
server and client, the problem is that the marshalling/unmarshalling seem
to work without error when null fields are present in the pojo even though
I have set @XmlElement(required=true, nillable=false) on the fields in
question.

Is this expected behaviour? To me it seems as if the moxy implementation is
not respecting the JAXB annotations. I'm using Jersey version 2.3.1

Thanks for any insight.

Piers