Skip to Content

We all know the famous syndication formats like RSS/Atom and also their advantages.
So how about exposing our Iview contents as RSS/Atom, which is really useful to keep our users uptodate of the content changes?

In this blog I will show you how to expose Custom IView contents as RSS 2.0 format using ROME open source library (https://rome.dev.java.net/)

ROME libraries support all popular RSS and ATOM formats.

Download the latest rome library (rome-1.0RC1.jar) and also latest jdom library (jdom.jar) from http://www.jdom.org/  and put them in distPORTAL-INFprivatelib folder of your project.

For our example I will implement an AbstractPortalComponent which is a news component with RSS functionality.

Here are the screenshots of what I have implemented:

Shows an Iview with RSS tray option

News Iview

Clicking the above MyRss tray option shows the RSS of the news Iview

News IviewRss XML

So adding the RSS link to your favourite RSS Client shows news updates from your Iview. The Rss link in the above example is http://wdfv00196150b:53000http://www.sdn.sap.com/irj/servlet/prt/portal/prtmode/rss/prtroot/myrssproject.myrsscomponent

RssOwl 

 

Here is the code:

  • ” + newsBean.title + “
  • “); } } /* *Adds the MyRss tray option to Iview tray */ private String addTrayOptionJSCode(String name, String function, String iViewID) { StringBuffer code = new StringBuffer(); code.append(”
To report this post you need to login first.

7 Comments

You must be Logged on to comment or reply to a post.

  1. Daniel Rothmund
    Hello,

    first of all thank you for the great blog. I have one question to Authentication of the Component. When I open the Component in portal it works fine.

    But when I direct open the componet I receive an exption. In the default trace i saw that the user guest open the rss feed.

    How can change the authentication , thaht the rss reader prompt for a user and password when the reader tries to open the rss..

    Regards

    daniel

    (0) 
  2. Suresh Kumar
    Hi Praveen,

    I have gone through your blog (Exposing IView contents as syndication format), first of all thank you very much. I have achieved what I required from your blog. I am able to run and generate feed, but I am facing one small issue.

    I am facing the issue with XML iView from the generated feed. I cant’t run the XML iView from the generated feed URL. It is giving me an exception “Error while using XML iView, please contact your system administrator”.

    As you said the XML iView wil take only RSS 1.0, I have given the same from my code but still getting the same exception. Could you please provide the solution to resolve my issue.

    Regards
    Suresh

    (0) 
    1. Praveen Kumar Gudapati Post author
      Hi Suresh,
      Are you using the RSS_TO_XHTMLB XML Transformer in your XML IView? Also check the generated feed to make sure that it is RSS 1.0.

      In generateRssFeed method, did you set feed version to rss_1.0?
      SyndFeed feed = new SyndFeedImpl();
      feed.setFeedType(“rss_1.0”);

      I tried using XML IView on NW7.0 system with the above settings and it worked for me.
      Regards,
      Praveen Gudapati

      (0) 
      1. Suresh Kumar
        Hi Praveen,

        I have given the same version from my code still getting the same exception. The feed have given the same version (1.0) what I have given from my code but it is generating in RDF.

        If possible, can you please send me the generated feed?, will cross check with my generated feed.

        Regards
        Suresh

        (0) 
        1. Praveen Kumar Gudapati Post author
          Hi Suresh,
          I cheked your XML you sent me and it is correct.
          For me I could use show this feed in XMLIview.
          I recommend to check the Logfile to know more infos about the error.
          Regards,
          Praveen
          (0) 
          1. Suresh Kumar
            Hi Praveen,

            I thought the same but I could not find where the log file is located for XMLiView. Could you please tell me location path of log file?

            Regards
            Suresh

            (0) 

Leave a Reply