Re: [Resteasy-users] XML format
Yeah that worked ... Sorry for not let you know before.. Sent from my iPhone. Excuse any typos Am 12.06.2012 um 21:27 schrieb Jim Stafford : > You can add the outer element using @XMLElementWrapper annotation > > http://docs.oracle.com/javase/6/docs/api/javax/xml/bind/annotation/XmlElementWrapper.html > > > On Tue, Jun 12, 2012 at 2:14 PM, Norman Maurer > wrote: >> Hi there, >> >> I have a simple question ( at least I hope its simple) ;) I have the >> following pojo: >> >> @XmlRootElement(name="myclass") >> public class MyClass { >> private Set mysecondclass = … >> .. >> } >> >> @XmlRootElement(name="mysecondclass") >> public class MySecondClass { >> private String value = … >> .. >> } >> >> If I now send this back to the client I get an XML like this: >> >> >> >> blah >> >> >> blah2 >> >> …. >> >> >> Would it somehow possible to have it formatted like this: >> >> >> >> >> blah2 >> >> >> blah2 >> >> …. >> >> >> >> This would be more inline with what I suspect and also "easier" to read. Any >> ideas ? >> >> -- >> Norman Maurer >> >> >> -- >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> ___ >> Resteasy-users mailing list >> Resteasy-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/resteasy-users >> > > > > -- > jim stafford > SRA I&S | JHU > > -- > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > ___ > Resteasy-users mailing list > Resteasy-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/resteasy-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users
Re: [Resteasy-users] XML format
You can add the outer element using @XMLElementWrapper annotation http://docs.oracle.com/javase/6/docs/api/javax/xml/bind/annotation/XmlElementWrapper.html On Tue, Jun 12, 2012 at 2:14 PM, Norman Maurer wrote: > Hi there, > > I have a simple question ( at least I hope its simple) ;) I have the > following pojo: > > @XmlRootElement(name="myclass") > public class MyClass { > private Set mysecondclass = … > .. > } > > @XmlRootElement(name="mysecondclass") > public class MySecondClass { > private String value = … > .. > } > > If I now send this back to the client I get an XML like this: > > > > blah > > > blah2 > > …. > > > Would it somehow possible to have it formatted like this: > > > > > blah2 > > > blah2 > > …. > > > > This would be more inline with what I suspect and also "easier" to read. Any > ideas ? > > -- > Norman Maurer > > > -- > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > ___ > Resteasy-users mailing list > Resteasy-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/resteasy-users > -- jim stafford SRA I&S | JHU -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users
Re: [Resteasy-users] XML format
Ya, JAXB has this option @XmlElementWrapper I think? Don't remember. On 6/12/12 2:14 PM, Norman Maurer wrote: > Hi there, > > I have a simple question ( at least I hope its simple) ;) I have the > following pojo: > > @XmlRootElement(name="myclass") > public class MyClass { > private Set mysecondclass = … > .. > } > > @XmlRootElement(name="mysecondclass") > public class MySecondClass { > private String value = … > .. > } > > If I now send this back to the client I get an XML like this: > > > > blah > > > blah2 > > …. > > > Would it somehow possible to have it formatted like this: > > > > > blah2 > > > blah2 > > …. > > > > This would be more inline with what I suspect and also "easier" to read. > Any ideas ? > > -- > Norman Maurer > > > > -- > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > > > ___ > Resteasy-users mailing list > Resteasy-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/resteasy-users > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users
[Resteasy-users] XML format
Hi there, I have a simple question ( at least I hope its simple) ;) I have the following pojo: @XmlRootElement(name="myclass") public class MyClass { private Set mysecondclass = … .. } @XmlRootElement(name="mysecondclass") public class MySecondClass { private String value = … .. } If I now send this back to the client I get an XML like this: blah blah2 …. Would it somehow possible to have it formatted like this: blah2 blah2 …. This would be more inline with what I suspect and also "easier" to read. Any ideas ? -- Norman Maurer -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users