Hi,
When I created a node via SWIS at C#, "Next Poll Time" set to node creating time (GETDATE()) and not polling for the next time. Is there any way to poll automatically via SWIS? Or can you tell me right way to do this?
Thanks.
I added that prefix but the error isn't gone. Is "NetObjectID" right? Is it maybe "NodeID" etc?
(v2 is my SWIS. Is support this verb on that version? Should I use v3?)
PS: I use v3 and poll now verb is running. Thanks.
You can cause a node to be polled like this:
Invoke-SwisVerb $swis Orion.Nodes PollNow @("N:123")
I took error, "verb not found". My code is below and I use Orion SDK v1.7
var swis = new InfoServiceProxy(address, binding, credentials);
XmlDocument xdoc = new XmlDocument();
XmlElement[] elem = new System.Xml.XmlElement[1];
XmlElement xel = xdoc.CreateElement("NetObjectID");
xel.InnerText = nodeID.ToString();
elem[0] = xel;
try
{
swis.Invoke("Orion.Nodes", "PollNow", elem);
Constants.logger.Debug(String.Format("{0} ID poll", nodeID));
}
catch (Exception exc)
Constants.logger.Error(String.Format("{0} ID not poll.", nodeID), exc);
Is the nodeID variable an int? The verb is expecting a value with the "N:" prefix.
I just checked and found that this verb is only supported in v3. Sorry for the confusion - I thought that verb was one of the ones supported in both v2 and v3.