This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

SWQL and PERL using SOAP

I am using the Perl interface example for the SWQL access.

I am trying to run a query against the Orion.ResponseTime table, here is what the query looks like:


SELECT  NodeID, DateTime, Archive, AvgResponseTime, MinResponseTime, MaxResponseTime, PercentLoss, Availability

FROM Orion.ResponseTime

WHERE NodeID = 28

AND DateTime = (SELECT max(DateTime) as DT

                             FROM Orion.ResponseTime

                          WHERE NodeID = 28 AND Availability < 50)

AND Availability < 50

This Query runs perfectly SWQL Studio, but when I put it into the Perl script and do the call using the $swis->QueryXml( $sql, {} );

It fails completely.  I have narrowed the problem down to the < and > symbols which are passed through SOAP and are translated into &lt; and &gt; when being passed.

                                

I even tried to utilize "BETWEEN 0 AND 50" and but the SWQL does not recognize the BETWEEN command.  I even tried replacing the < and > with LT and GT, and even tried to use &lt and &gt.  I also tried to wrap the sql in     $sql = "<![CDATA[$sql]]>";  with no success.

Does anyone have any other solutions that work? 

Attached is the exact message I am receiving.

Thank you,

Charles