Thanks to some examples you've posted here, I've been able to add a new node and to unmanage a node from a perl script. But now I want to take a node I've added and place it into a pre-existing group. A distilled version of my code, which is based on something I found in this forum, is below. I know that groupID 42 exists and I know that a new node I created has nodeID 3114. When I run it, I get "System.NullReferenceException: Object reference not set to an instance of an object." which is not giving me much of a clue. AFAICT this code is identical to code posted earlier. Can anyone help? I don't know how you all have been able to figure out so much when there is no full SDK/API documentation available! (Or is there some good doc hidden away that I am just not finding?).
#!/usr/bin/perl
use SW::InformationService;
use SOAP::Lite;
use XML::LibXML;
my $username = "xxxxxxxxxx";
my $password = "yyyyyyyyy";
my $nodeID = 3114;
my $groupID = 42;
my $endpoint = "https://aaaaa.bbb.ccc:17778/SolarWinds/InformationService/v3/OrionBasic";
my $swis = SW::InformationService->new();
$swis->outputxml("true");
$swis->proxy($endpoint);
$swis->proxy->ssl_opts(verify_hostname => 0);
$swis->proxy->ssl_opts(SSL_verify_mode => SSL_VERIFY_NONE);
$swis->proxy->http_request->authorization_basic($username, $password);
my $memberDefinitionInfo = SOAP::Data->type('xml'=>
"<MemberDefinitionInfo xmlns='http://schemas.solarwinds.com/2008/Orion'>
<Name></Name>
<Definition>swis://./Orion/Orion.Nodes/NodeID=3114</Definition>
</MemberDefinitionInfo>");
print $swis->Invoke("Orion.Container", "AddDefinition", [$groupID, $memberDefinitionInfo]);
$ ./add_node_to_group.pl
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><log xmlns="http://schemas.solarwinds.com/2007/08/informationservice">2015-05-05 16:31:49,124 [16] ERROR SolarWinds.InformationService.Core.Informa
tionService - (null) 
Exception for Operation: <soap:Envelope xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsap="http://schemas.x
mlsoap.org/ws/2004/08/addressing/policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:swis="http://schemas.solarwinds.com/2007/08/informationservice
" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:msa="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:sys="http://schemas.datacontract.org/20
04/07/System.Xml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:swpb="http://schemas.solarwinds.com/2007/08/informationservice/propertybag" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsa10="ht
tp://www.w3.org/2005/08/addressing" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" x
mlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex">
<s:Header xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<To s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">https://fnorion.fnal.gov:17778/SolarWinds/InformationService/v3/OrionBasic</To>
<Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://schemas.solarwinds.com/2007/08/informationservice/InformationService/Invoke</Action>
</s:Header>
<soap:Body>
<swis:Invoke>
<swis:entity xsi:type="xsd:string">Orion.Container</swis:entity>
<swis:verb xsi:type="xsd:string">AddDefinition</swis:verb>
<swis:parameters>
<sys:XmlElement>
<arg xsi:type="xsd:int">42</arg>
</sys:XmlElement>
<sys:XmlElement>
<MemberDefinitionInfo xmlns="http://schemas.solarwinds.com/2008/Orion">
<Name></Name>
<Definition>swis://./Orion/Orion.Nodes/NodeID=3114</Definition>
</MemberDefinitionInfo>
</sys:XmlElement>
</swis:parameters>
</swis:Invoke>
</soap:Body>
</soap:Envelope>
2015-05-05 16:31:49,124 [16] ERROR SolarWinds.InformationService.Core.InformationService - (null) 
Exception caught in method Invoke
System.NullReferenceException: Object reference not set to an instance of an object.
at SolarWinds.InformationService.Verb.VerbExecutor.Invoke(Object hostInstance, Object[] parameters)
at SolarWinds.InformationService.Verb.VerbExecutorContext.Invoke()
at SolarWinds.InformationService.Core.InformationService.InvokeInternal[T](String entity, String verb, Action`1 setupParameters, Func`2 extractReturnValue)
at SolarWinds.InformationService.Core.InformationService.Invoke(String entity, String verb, XmlElement[] parameters)
</log></s:Header><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring xml:lang="en-US">Invoke failed, check fault information.</faultstring><detail><InformationServiceFaultContract xmlns="http://schemas.solarwinds
.com/2007/08/informationservice" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Message>Object reference not set to an instance of an object.</Message><ExceptionType>System.NullReferenceException</ExceptionType><Ful
lException>System.NullReferenceException: Object reference not set to an instance of an object.
at SolarWinds.InformationService.Verb.VerbExecutor.Invoke(Object hostInstance, Object[] parameters)
at SolarWinds.InformationService.Verb.VerbExecutorContext.Invoke()
at SolarWinds.InformationService.Core.InformationService.InvokeInternal[T](String entity, String verb, Action`1 setupParameters, Func`2 extractReturnValue)
at SolarWinds.InformationService.Core.InformationService.Invoke(String entity, String verb, XmlElement[] parameters)</FullException></InformationServiceFaultContract></detail></s:Fault></s