Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. @XmlType
  2. @XmlAccessorType( XmlAccessType.FIELD )
  3. public class First
  4. {
  5. private String attr1;
  6. private String attr2;
  7.  
  8. /**
  9. * @return the attr1
  10. */
  11. public String getAttr1()
  12. {
  13. return attr1;
  14. }
  15.  
  16. //the other getters and setters
  17.  
  18. }
  19.  
  20. @XmlType
  21. @XmlAccessorType( XmlAccessType.FIELD )
  22. public class Second
  23. {
  24. private String attr3;
  25. private String attr4;
  26.  
  27. //getters and setters
  28.  
  29. }
  30.  
  31. @XmlRootElement
  32. @XmlAccessorType( XmlAccessType.FIELD )
  33. public class HeadElement
  34. {
  35. private First firstElement;
  36. private Second secondElement;
  37.  
  38. //getters and setters
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement