pebblespro
New Member
I have a RESTful API implemented with JAXB. There's a common java object that I use for a xml type that is used in different API responses. What annotations from the javax.xml package can I use so that I can create a wrapper for the UserInfo class below in my xml response? I know that the \[code\]@XmlElementWrapper\[/code\] annotation creates you a wrapper but it's intended for collections. I want the same functionality but for non-collections.For example:\[code\]public class UserInfo { private String name; private Long id;}public ResponseA { public UserInfo userInfo;}<ResponseA> <Teacher> <UserInfo>