Try marking them as transient:
private transient String password;
Such fields will not be serialized.
No I still need them persisted, just dont want to pass them back via a web service. For example why would @Version be sent back? It is not use to the user
Did you try using @XmlTransient jaxb annotation?
Not sure this is what you want, but if I need to send some attribute only if it is not empty, then I declare it as:
@XmlElement(name = "StatementDate", required = false)
public final Date getStmtDate()
If I want the the attribute to be sent even if it is empty, I use nillable=true
This would not work if you want to prevent a non-empty attribute from being sent though.