!NO! more struggle with XPages as RSS source and JWPlayer

I am working on embedding JWPlayer in a Domino app and I want to use an XPages to generate an RSS feed for a playlist. Via this way I can apply some ‘intelligence’ and direct which related items the playlist should contain. How the code should look like you can see here.

The problem I am facing at the moment is that JWPlayer has problems using a source that is based other that the xml extension.

Task Queue failed at step 5: Playlist could not be loaded: XML could not be parsed or playlist was empty

Whenever I save the .xsp results as an .xml file and add it to the application as a file resource and call it the player works fine.

In traditional Domino development it is possible to call an agent e.g. rss.xml but XPages does not allow it, it can only contain numbers, letters, underscore and hyphen.

  • Do you see any options using XPages or am i thrown back to writing an agent?

Update: problem solved as you can see in the image below.

Advertisements

7 thoughts on “!NO! more struggle with XPages as RSS source and JWPlayer

  1. Patrick Picard 2011-January-26 / 6:21 pm

    Have you tried using Xpages as an “Xagent” and get a handle of the output writer, set the mime type and spew out the XML.

    I think that would mimick giving it an xml file (which is what you do when you save the file and put that file as source)

  2. Thomas Adrian 2011-January-26 / 7:35 pm

    Could you add a parameter to the .xsp: e.g rss.xsp?source=.xml

  3. Toby Samples 2011-January-26 / 7:41 pm

    Hi Patrick,

    I believe what you probably need to do is setup the content-disposition header in your Xagent like this:

    response.setHeader(“Content-disposition”, “attachment; filename=rss.xml”);

  4. Jesse Gallagher 2011-January-26 / 8:18 pm

    I’ve found that you can add arbitrary additional path info to the URL after the XPage name – like /Foo.xsp/some/other/params – and it will still load the XPage correctly. So in your case, you could try something like “/Feed.xsp/rss.xml”. Though you wouldn’t need it in this case, you can access that post-.xsp portion via facesContext.getExternalContext().getRequest().getPathInfo() (there may be an easier way, but that’s the one I ran across when I found it).

  5. Patrick Kwinten 2011-January-26 / 10:00 pm

    Well I have written an agent and calling that as the playlist source and there is no problem there.

    If you consider the error message there are just 2 options:
    XML could not be parsed or
    Playlist was empty

    If I look in Firebug at the Net traffic I see that my XPage is called and returns a valid XML file, however the items are empty:

    {?xml version=’1.0′ encoding=’utf-8′?}{rss version=”2.0″ xmlns:media=”http://search.yahoo.com/mrss/”}
    {channel}
    {title}Viewr Week4 v2{/title}
    {link}http://server01.domain.com/ds01232/viewr.nsf{/link}
    {/channel}
    {/rss}

    when opening the referencing URL in a browser I get as result:

    {?xml version=’1.0′ encoding=’utf-8′?}{rss version=”2.0″ xmlns:media=”http://search.yahoo.com/mrss/”}
    {channel}
    {title}Viewr Week4 v2{/title}
    {link}http://server01.domain.com/ds01232/viewr.nsf{/link}
    {item}
    {title}Hiding the blog roll{/title}
    {link}http://www.domain.com{/link}
    {description}File: hiding_blogroll.flv. Description: The attached video demonstrates how to hide the blog roll section on your blog.{/description}
    {media:credit role=”author”}Patrick Kwinten/0180/ACME{/media:credit}
    {media:content duration=”33″ type=”video/x-flv” url=”http://server01.domain.com/ds01232/viewr.nsf/0/D163D8AD52F46D15C125781400651825/$FILE/hiding_blogroll.flv”/}
    {/item}
    {item}
    {title}Adding links to the blog roll{/title}
    {link}http://www.domain.com{/link}
    {description}File: adding_links_to_blogroll.flv. Description: The attached video demonstrates how to organize and add links to the blog roll function.{/description}
    {media:credit role=”author”}Patrick Kwinten/0180/ACME{/media:credit}
    {media:content duration=”33″ type=”video/x-flv” url=”http://server01.domain.com/ds01232/viewr.nsf/0/D163D8AD52F46D15C125781400651825/$FILE/hiding_blogroll.flv”/}
    {/item}
    {/channel}
    {/rss}

    To me it seems that some parts of the code in the XPage are not available when not opened in the browser ???

    The “/Feed.xsp/rss.xml” is a good one though, maybe usefull for search engine indexing…

  6. Fredrik Stöckel 2011-January-26 / 11:44 pm

    a substitution url doc in the NAB might be another solution.

    Fredrik

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s