Expand my Community achievements bar.

createNode/publishItem problems

Avatar

Level 4

Hi,

It looks like my CF code is subscribing to a Collection node. But When publishing even using the files that came with the SDK im getting this
Create Node failed                
type: Expression                   
message: Variable RESULT is undefined.                   
detail:

A node exists on the server after running createNode. Next when trying to publish to that node. (or any node if i create it manualy or on the server) it tells me im sucessfull but I dont see anything in the room console.

im totaly stuck and i havent even started listening to events.

Here is my code

thanks.

...russ

<cftry>       
        <cfset configuration = StructNew()>
        <cfset configuration.persistItems = true>
        <cfset configuration.userDependentItems= false>
        <cfset configuration.publishModel = 50>
        <cfset configuration.lazySubscription = true>
        <cfset configuration.allowPrivateMessages = true>
        <cfset configuration.modifyAnyItem= false>
        <cfset configuration.accessModel= 50>
        <cfset configuration.itemStorageScheme= 2>
        <cfset configuration.sessionDependentItems= true>
        <cfset configuration.p2pDataMessaging= true>

        <cfset result = Session.accountManager.createNode("temp1", "myCollection", "myNode",configuration)>
        <cfset xmlresult = xmlParse(result) />
        Create Node <cfoutput>#xmlresult.status.XmlAttributes["code"]#</cfoutput>
        <cfcatch>
            <cfoutput> Create Node failed</cfoutput>
            <br/>
                    <cfoutput>type: #cfcatch.Type#</cfoutput>
                <br/>
                    <cfoutput>message: #cfcatch.Message#</cfoutput>
                <br/>
                    <cfoutput>detail: #cfcatch.Detail#</cfoutput>
                <br/>
                <cfabort>
        </cfcatch>
        </cftry>

and publishing to a node

    <cftry>
        <cfset item = StructNew()>
        <cfset item.nodeName = "myNode">   
        <cfset item.body = "message from my server">
    
       
        
        <cfset result = Session.accountManager.publishItem("temp1", "myCollection", "myNode", item, true)>
        <cfoutput>Publish Item: sucessful</cfoutput>
        <cfcatch>
            <cfoutput> Publish Item failed</cfoutput>
            <br/>
                    <cfoutput>type: #cfcatch.Type#</cfoutput>
                <br/>
                    <cfoutput>message: #cfcatch.Message#</cfoutput>
                <br/>
                    <cfoutput>detail: #cfcatch.Detail#</cfoutput>
                <br/>
                <cfabort>
        </cfcatch>
    </cftry>

0 Replies