I am creating a webservice that will allow us to retriueve umbraco content on web portals located on other servers.
I am having trouble getting the Node Factory to work. The webservice is coded inside the umbraco install. I import the NodeFactory namespaces and perform a call like this:
Node n = new Node(nodeId); // where nodeId is a published node
The node always returns with blank class properties. And the Properties array has one entry:
n.Properties[0].Alias; // "error" n.Properties[0].Value; // "No published item exist with id #" where # is nodeId
Alternatively, I can use the Document class which works. But I do not want to sacrifice performance with the added db calls it invokes.
The only property I can retrieve with the getProperty call is "error".
n.getProperty("error").Value; // "No published item exist with id #" where # is nodeId n.getProperty("content").Value // Null exception because getProperty returns null
Also, I have made sure that node data is up to date and available in umbraco.config, which it is.
Yes, I was able to resolve the issue. I apologize for not updating this thread.
Ultimately, the issue was related to load balancing not being setup entirely correct. And load balancing is going to differ widely among who sets it up and what the specific needs are.
My suggestion, if you aren't already, is to try the node factory code first in a non-load balanced environment.
Blank Node from Node Factory
I am creating a webservice that will allow us to retriueve umbraco content on web portals located on other servers.
I am having trouble getting the Node Factory to work. The webservice is coded inside the umbraco install. I import the NodeFactory namespaces and perform a call like this:
The node always returns with blank class properties. And the Properties array has one entry:
Alternatively, I can use the Document class which works. But I do not want to sacrifice performance with the added db calls it invokes.
Thanks!
Maybe try..
The only property I can retrieve with the getProperty call is "error".
Also, I have made sure that node data is up to date and available in umbraco.config, which it is.
Hi Matthew,
were you able to resolve your issue?
I have the same problem now,
given
Thanks,
Matt
Hi Matt,
Yes, I was able to resolve the issue. I apologize for not updating this thread.
Ultimately, the issue was related to load balancing not being setup entirely correct. And load balancing is going to differ widely among who sets it up and what the specific needs are.
My suggestion, if you aren't already, is to try the node factory code first in a non-load balanced environment.
is working on a reply...