XML root Element has an id attribute with the value something like
<Party id="PARTYID_1341592540748_ed044bd3-b8b2-40f9-a679-4daa411ecc45">
Here I need complete PartyId and a part of it in two different variables. I am trying to achieve it like this:
@XmlAttribute
protected String id;// complete partyId
@XmlTransient
@XmlAttribute(name="id")
@XmlJavaTypeAdapter(PartyIdAdapter.class) //has logic to trim full party Id
protected String partyId; //sub partyId
But I always get null for String partyId.
I have finally achieved it with the help of third variable:
If you can come up with an elegant solution then please let me know.