<student>
<id>1</id>
<badge></badge>
<name>Matt</name>
</student>
This is my xml post when I observe during post.
public class Student implements Serializable{
Long id;
Integer badge;
String name;
}
My Web Service :
@Path("add")
@POST
@Consumes({Mediatype.xml,Mediatype.json})
@Produces({Mediatype.xml,Mediatype.json})
public Response add(Student student)
{
}
When I debug on this add method on my service layer , variable badge gets assigned value "0", even though it is not provided by GUI.Database field for badge is also integer(postgres).
Is it something related to Integer variable, which assigns default value to 0 if not present ?