This is the XML output I currently get:
<parameter>
<dataIdentifier>123</dataIdentifier>
<newValue encoding="base64">
<value>NjUw</value>
</newValue>
</parameter>
And this is the XML output I want to have:
<parameter>
<dataIdentifier>123</dataIdentifier>
<newValue encoding="base64">NjUw</newValue>
</parameter>
Here are my Java classes so far:
@XmlRootElement(name = "parameter")
public class Parameter {
private Integer dataIdentifier;
private ParameterValue newValue;
..
}
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class ParameterValue {
@XmlAttribute(name="encoding")
private String encoding;
private String value;
..
}
I am sure there is an easy solution for my problem. Unfortunately I do not have any idea about JAXB annotations. I already invested a few hours but I can't find a way to do it. Can someone please show me how to solve this?
Thanks