You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WQL array properties keep only their last element #189
Found during the pre-release documentation review (#187), by reading the code.
Problem
A WMI array property comes back with only its last element. Examples are IPAddress, IPSubnet and DefaultIPGateway in SELECT * FROM Win32_NetworkAdapterConfiguration, or Capabilities in Win32_DiskDrive.
WS-Management returns an array property as several sibling elements with the same name:
When the client builds each row, every element overwrites the previous one, so row.string("IPAddress") is "fe80::1" and the IPv4 address is lost without any error. Every WQL query goes through this code, fluent and legacy API alike.
A related inaccuracy: a WMI NULL (xsi:nil="true") comes back as an empty string, but the WqlRow.get() / string() Javadoc says they return null "when the property is absent or null". Today they only return null when the row has no such property.
All the values of an array property are kept. How to expose them needs a decision, because the legacy API is consumed as strings (WinRMWqlExecutor.getRows() is List<List<String>>, used by MetricsHub):
The fluent WqlRow.get(...) could return a List<String> for an array property.
The legacy rows need a string. Check what 1.x (tag v1.1.02, CXF-based) returned for array properties before choosing, so existing consumers keep working.
Also align the WqlRow Javadoc with how a WMI NULL is represented (or map xsi:nil to null, if the legacy API allows it). Then update WQL Queries → Reading the result, which currently says values are the text WinRM sends and a WMI NULL is an empty string.
Activity
Keep every element of WQL array properties, joined with a separator
Merge pull request #193 from MetricsHub/189-wql-array-properties-keep…