I don't see anything obviously wrong with your code. Next debugging steps:
- look at the SWISv3 log and see if there is a useful error there (C:\ProgramData\SolarWinds\InformationService\v3.0\Orion.InformationService.log).
- do the custom property update using an API testing tool like Postman or SoapUI and see if you can get it to work there.
Thanks for your fast response.
I don't have access (yet) to the server so I can't look in the log.
But using SoapUI, I do get an interesting error back that I do not with Java.
"Message": "Entity Orion.NodesCustomProperties does not contain requested property item of navigation property e.CustomProperties", "ExceptionType": "SolarWinds.Data.Query.ParserException", "FullException": "SolarWinds.Data.Query.ParserException: Entity Orion.NodesCustomProperties does not contain requested property item of navigation property e.CustomProperties\r\n at SolarWinds.Data.Query.Processor.SemanticChecker.HandleNavigationProperty(EntityExpression entityExpression, String srcEntityName, String navigationPropertyNames)\r\n at SolarWinds.Data.Query.Processor.SemanticChecker.Visit(EntityExpression entityExpression)\r\n at SolarWinds.Data.Query.Swql.ParseTreeDuplicator.Visit(ColumnExpression column)\r\n at SolarWinds.Data.Query.Processor.SemanticChecker.Visit(ColumnExpression column)\r\n at SolarWinds.Data.Query.Swql.ParseTreeDuplicatorNoState.Visit(SelectClause select)\r\n at SolarWinds.Data.Query.Processor.SemanticChecker.Visit(SelectStatement statement)\r\n at SolarWinds.Data.Query.Processor.SemanticChecker.Process(SelectStatement statement)\r\n at SolarWinds.Data.Query.Processor.PreProcessor.ProcessInternal(PreProcessorState& preProcessorState)\r\n at SolarWinds.Data.Query.Engine.QueryProcessor.ProcessInternal(String query, IQueryExecutionContext context)\r\n at SolarWinds.InformationService.Core.QueryPlanCache.GetQueryPlan(String query, String username, Func`1 buildQueryPlan)\r\n at SolarWinds.InformationService.Core.SwisUriResolver.Resolve(String query, Dictionary`2 queryParameters, Boolean applyAccessControl)\r\n at SolarWinds.InformationService.Core.SwisUriResolver.d__13.MoveNext()\r\n at SolarWinds.InformationService.Core.CrudProcessor.d__44.MoveNext()\r\n at SolarWinds.InformationService.Core.CrudProcessor.UpdateInternal(Boolean bulkMode, SwisUriResolver uriResolver, IDictionary`2 propertiesToUpdate, IQueryExecutionContext context)\r\n at SolarWinds.InformationService.Core.CrudProcessor.Update(IServiceHost serviceHost, SwisUri uri, IDictionary`2 propertiesToUpdate, IQueryExecutionContext context)\r\n at SolarWinds.InformationService.Core.InformationService.Update(String uri, IDictionary`2 propertiesToUpdate)" }
My CustomProperty is associated with the NodeID that I'm using in the URI. I see my property in the web dashboard, node details.
Using SWSQL Studio and running a query on Orion.NodesCustomProperties also shows my property on the NodeID
I'm using the trial version of NPM recently downloaded and the admin acct.
I just tried it again and it is working as expected for me in NPM 11.5.3.
Could you post a screenshot of soapui or something showing the uri and post data?
You wrote that you "tried it again and is working as expected"
Did you try with the Java code or different method?
After I got the SoapUI error that I posted in previous response, I deleted my custom properties and re-added to make sure it was setup correctly. And magically, the SoapUI started working and via the Web dashboard, I could see my property toggle state. Not sure what I did wrong originally but must have been something off.
But I also noticed something else interesting, the SoapUI REST call returns null, not a json response that the Java code is expecting.
So if I change my post call from:
then everything works as expected.
So basically if the call returns null, it succeeds. Else it throws an exception. Is this correct?