The following object did NOT work -
public class CreditCardVO implements Serializable {
private Long ccNumber;
private String ccName;
public CreditCardVO(Long ccNumber, String ccName) {
this.ccNumber = ccNumber;
this.ccName = ccName;
}
public Long getCcNumber() {
return ccNumber;
}
public String getCcName() {
return ccName;
}
}
When i added the no-args constructor and the annotations it worked!
@XmlAccessorType(XmlAccessType.FIELD)
public class CreditCardVO implements Serializable {
private Long ccNumber;
private String ccName;
public CreditCardVO(Long ccNumber, String ccName) {
this.ccNumber = ccNumber;
this.ccName = ccName;
}
private CreditCardVO() {
// for JAXB's Magic
}
public Long getCcNumber() {
return ccNumber;
}
public String getCcName() {
return ccName;
}
}