How to create a RSS feed from compiled classes?

Aug 20, 2008 at 11:36 AM
Hi there,

I compiled the Rss 2.0 schema, and I got the classes from it (Java code). Everything fine, and my question is about how to populate the TRss element ?

my goal:

<rss version="2.0">

  my last trial:

            Rss rssFeed = new Rss();
            rssFeed.getOtherAttributes().put(new QName("", "version"), "2.0");

            TRssChannel channel = new TRssChannel();
            channel.getTitleOrLinkOrDescription().put(new QName("", "title"), "Cars @ Cejug Classifieds");

a code sample in any language would be cool :)
Sep 7, 2008 at 5:49 PM
Logged as work item 11187
Sep 9, 2008 at 6:36 AM
Release rss2schema- includes C# code samples showing how to construct an example RSS 2.0 feed file using data classed generated by the .NET xsd.exe tool.

Download release rss2schema-
Sep 9, 2008 at 8:12 AM
Great job, but there is a detail: ItemsChoiceType1

from the Microsoft documentation: "This API supports the .NET Framework infrastructure and is not intended to be used directly from your code."

I am looking for an equivalent structure in Java.. actually, the schema compiled using wsimport and it is useful in the Java side, but I am still missing the way of constructing an item in my Java code. I will try to use Enumeration instead of ItemsChoiceType1 but I am not sure about that..

Please keep your good work with this schema, we are quite close to have fully interoperability in this RSS document.

Other tip:  I needed to convert the type Rss in to an xml element Rss.. because I can't declare messages using types in WSDL (ok, I can create my own wrapper, but then the return type of my service is not pure RSS anymore...
Sep 9, 2008 at 8:36 AM
following the tips of this article:

we can replace the unbounded choice of Channel and Item elements by polymorphic model: generating exactly the same xml results an with a fully interoperable code in both .Net and Java..

how about that ?
Sep 9, 2008 at 9:48 AM
I found a workaround in Java:
Mar 1, 2009 at 8:41 AM
Is there anyone who managed to do this in C++?