I've been writing a perl api layer for our internal applications for the past year and I have accumulated quite a few unit tests. Today while switching from using a SWISv2 connection to using SWISv3, one of my unit tests started failing with a (500 Status read failed: Connection reset by peer) fault string. Upon checking the v3.0/Orion.InformationService.log file, I find that my existing unit test, which passes with a v2 connection, fails with v3.
It turns out my SELECT has a column named twice in the query (displayed here as the perl string)
'SELECT NodeID, Uri, ObjectSubType, DNS, SysName, NodeName, IPAddress, NodeDescription, Vendor, SysObjectID, Location, Status, EngineID, Description, Displayname, NodeDescription FROM Orion.Nodes WHERE NodeDescription LIKE \'%D-Link%\''
Interestingly, duplicating the column name does not cause a problem in SWQL Studio at all, it happily displayed both instances of the field without issue. It's only the SOAP interface that's having problems with this. Hence, I vote that this is a new bug in the SWIS interface that fails to properly support the full SWQL syntax.
I have already fixed the issue in my unit test, but this points out that here's another v2 vs v3 behavioral difference, and how I really wish that SWIS would pass the error message from the log back to the client rather than just closing the connection with no feedback. It's rather a pain having to go digging through logs trying to debug things.
I'm using SDK 1.8 with Orion Platform 2014.1.0, NCM 7.2.2, NPM 10.7, UDT 3.0.2, IVIM 1.9.0, VNQM 4.1
The v3.0 log shows this:
2014-04-03 16:12:16,852 [57] ERROR SolarWinds.InformationService.Serialization.XmlSerializer - Error serializing query results <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.xmlsoap.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/2004/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="http://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/" xmlns: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://172.16.10.22: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/QueryXml</Action>
</s:Header>
<soap:Body>
<swis:QueryXml>
<swis:query xsi:type="xsd:string">SELECT NodeID, Uri, ObjectSubType, DNS, SysName, NodeName, IPAddress, NodeDescription, Vendor, SysObjectID, Location, Status, EngineID, Description, Displayname, NodeDescription FROM Orion.Nodes WHERE NodeDescription LIKE '%D-Link%' RETURN XML AUTO</swis:query>
</swis:QueryXml>
</soap:Body>
</soap:Envelope>
SELECT [T1].[NodeID] AS C1, ((N'swis://solarwinds-npm.pavlovmedia.corp/Orion/Orion.Nodes' + N'/NodeID=') + EscapeSWISUriValue([T1].[NodeID])) AS C2, [T1].[ObjectSubType] AS C3, [T1].[DNS] AS C4, [T1].[SysName] AS C5, [T1].[Caption] AS C6, [T1].[IP_Address] AS C7, [T1].[Description] AS C8, [T1].[Vendor] AS C9, [T1].[SysObjectID] AS C10, [T1].[Location] AS C11, [T1].[Status] AS C12, [T1].[EngineID] AS C13, [T1].[MachineType] AS C14, [T1].[Caption] AS C15, [T1].[Description] AS C16
FROM [dbo].[Nodes] AS T1
INNER JOIN [dbo].[NodeWebUri] AS T2 ON ([T2].[NodeID] = [T1].[NodeID])
WHERE ([T1].[Description] LIKE N'%D-Link%')
RETURN XML Auto
System.InvalidOperationException: Invalid path: Property name already exists - [Nodes[EntityType=Orion.Nodes]/@NodeDescription]
at SolarWinds.InformationService.Serialization.XmlResponseSerializerAutoStrict.MakeSchema(IEnumerable`1 columnsMetadata)
at SolarWinds.InformationService.Serialization.XmlResponseSerializerAutoStrict.EmitHierarchicalSchema(XmlWriter writer, IEnumerable`1 columnsMetadata)
at SolarWinds.InformationService.Serialization.XmlResponseSerializerAutoStrict.Serialize(XmlWriter writer)
at SolarWinds.InformationService.Serialization.XmlSerializer.OnSerialize(XmlWriter writer)