Jayesh, I was able to create a NPE by not supplying isPermaLink:

<cfscript>
// Create the feed data structure and add the metadata.
myStruct = StructNew();
mystruct.link = "http://www.cnn.com";;
myStruct.title = "CNN";
mystruct.description = "This... is... CNN";
mystruct.pubDate = Now();
mystruct.version = "rss_2.0";
/* Add the feed items. A more sophisticated application would use
dynamic variables
and support varying numbers of items. */
myStruct.item = ArrayNew(1);
myStruct.item[1] = StructNew();
myStruct.item[1].description = StructNew();
myStruct.item[1].description.value = "Desc 1";
myStruct.item[1].link = "http://www.cnn.com/1.cfm";;
myStruct.item[1].pubDate = Now();
myStruct.item[1].title = "Title one";
myStruct.item[1].guid = structNew();
myStruct.item[1].guid.value = "http://www.foo.com";;

myStruct.item[2] = StructNew();
myStruct.item[2].description = StructNew();
myStruct.item[2].description.value = "Desc 2";
myStruct.item[2].link = "http://www.cnn.com/2.cfm";;
myStruct.item[2].pubDate = Now();
myStruct.item[2].title = "Title Two";
</cfscript>

<!--- Generate the feed and save it to a file and variable. --->
<cffeed action = "create"
name = "#myStruct#"
overwrite = "yes"
xmlVar = "myXML">

<cfdump var="#xmlParse(myXML)#">


On 9/17/07, Jayesh Viradiya <[EMAIL PROTECTED]> wrote:
> Hi Nathan,
>
> In the repro case provided by you, I could notice that you were trying
> to use an Invalid attribute(linkhref) for the GUID element. GUID could
> have only one Optional element that is "isPermaLink". Check RSS 2.0 spec
> for more information.
>
> So modify your Code with the following lines at appropriate places and
> it should work fine. Although there is a bug that IsPermaLink acts as
> mandatory attribute as of now. We are tracking that bug.
>
>
> <cfset myStruct.item[i].guid = structnew()>
> <cfset myStruct.item[i].guid.isPermaLink="YES/NO(anyone)">
> <cfset myStruct.item[i].guid.value = "http://www.google.com";>
>
>
> Thanks
> Jayesh Viradiya
> Adobe CF Team
>
>
> -----Original Message-----
> From: Jayesh Viradiya [mailto:[EMAIL PROTECTED]
> Sent: Sunday, September 16, 2007 7:25 PM
> To: CF-Talk
> Subject: RE: Cffeed - creating RSS Feeds and guid
>
> Hi Nathan C. Smith
>
> Could you please isolate the code which throws the Null Pointer
> exception and post it here or send it to me at "[EMAIL PROTECTED]" for us
> to be able to reproduce it in order to investigate it.
>
>
> Thank you
> Jayesh Viradiya
> Adobe CF Team
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion is delivering applications solutions at at top companies 
around the world in government.  Find out how and where now
http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288655
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to