Quantcast
Channel: THWACK: Popular Discussions - Orion SDK
Viewing all articles
Browse latest Browse all 3719

Need Help with Update through SOAP via VBScript

$
0
0

I want to write a GPO to apply to all of our server.  I plan for this GPO to run a vbscript to update/create (if Needed) Node Properties In Orion, including Custom Properties.
I am able to get the QueryXML SOAP Method to Work, but I am Not able To figure out how to get the Update/Create methods to work Over SOAP.

I'm not a total expert on VBScript, so there may be some issues with some of my approaches.   So, basically I wrote a SOAP Class in vbscript to take a wsdl link and find all the soap Methods.  It stores these Methods in a Dictionary.

I have created another Class for NPM, that is basically Orion Specific stuff, Like Server/Port Information, and a couple Generic functions to pass to the SOAP class.

 

So basically This Soap works for Querying:

<?xml version="1.0"?>

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inf="http://schemas.solarwinds.com/2007/08/informationservice" xmlns:prop="http://schemas.solarwinds.com/2007/08/informationservice/propertybag"><soapenv:Header/><soapenv:Body><inf:QueryXml><inf:query>SELECT Caption, NodeID, IP_Address FROM Orion.Nodes WHERE NodeID &gt; 479</inf:query><inf:parameters></inf:parameters></inf:QueryXml></soapenv:Body></soapenv:Envelope>

 

But When I try to Update:

 

<?xml version="1.0"?>

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inf="http://schemas.solarwinds.com/2007/08/informationservice" xmlns:prop="http://schemas.solarwinds.com/2007/08/informationservice/propertybag"><soapenv:Header/><soapenv:Body><inf:Update><inf:query>swis://dtsfkoriont2/Orion/Orion.Nodes/NodeID=2/CustomProperties</inf:query><inf:parameters>ScriptVerify=Yes</inf:parameters></inf:Update></soapenv:Body></soapenv:Envelope>

 

I get the following Error:

9/16/2013 1:37:14 PM --> DEBUG -- (3) - CSOAP::Send() --> Status: 500

9/16/2013 1:37:14 PM --> DEBUG -- (3) - CSOAP::Send() --> Status Txt: Internal Server Error

9/16/2013 1:37:14 PM --> DEBUG -- (3) - CSOAP::Send() --> Receiving XML:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><log xmlns="http://schemas.solarwinds.com/2007/08/informationservice">2013-09-16 13:37:14,664 [18] ERROR SolarWinds.InformationService.Core.InformationService - Exception for Operation: &lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inf="http://schemas.solarwinds.com/2007/08/informationservice" xmlns:prop="http://schemas.solarwinds.com/2007/08/informationservice/propertybag"&gt;

  &lt;soapenv:Header&gt;

    &lt;To soapenv:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none"&gt;https://dtsfkoriont2:17778/SolarWinds/InformationService/v3/OrionBasic</To>

    &lt;Action soapenv:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none"&gt;http://schemas.solarwinds.com/2007/08/informationservice/InformationService/Update</Action>

  &lt;/soapenv:Header&gt;

  &lt;soapenv:Body&gt;

    &lt;inf:Update&gt;

      &lt;inf:query&gt;swis://dtsfkoriont2/Orion/Orion.Nodes/NodeID=2/CustomProperties&lt;/inf:query&gt;

      &lt;inf:parameters&gt;ScriptVerify=Yes&lt;/inf:parameters&gt;

    &lt;/inf:Update&gt;

  &lt;/soapenv:Body&gt;

&lt;/soapenv:Envelope&gt;

2013-09-16 13:37:14,664 [18] ERROR SolarWinds.InformationService.Core.InformationService - Exception caught in method Update

System.ArgumentNullException: Value cannot be null.

Parameter name: uri

   at SolarWinds.InformationService.Core.InformationService.Update(String uri, IDictionary`2 propertiesToUpdate)

</log></s:Header><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring xml:lang="en-US">Update 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>Value cannot be null.

Parameter name: uri</Message></InformationServiceFaultContract></detail></s:Fault></s:Body></s:Envelope>

 

 

Thanks in advance for the help.  I can share my scripts when I get it completed.


Viewing all articles
Browse latest Browse all 3719

Trending Articles