Unexpected HPOO 9.00 SDK behavior
I'm messing around with the HPOO 9.00 SDK on a 9.02.0002 HPOO core I have setup (I didn't see a 9.02 SDK anywhere).
I have a subflow which does some XML xPath queries to pull data out of an XML return document from HPSM. When I run the subflow in Central or Studio and provide the required inputs, it works fine.
When I use the SDK and provide the data, it fails. I have a feeling its one of my inputs fields. One fields is a CSV list of values. The other is the XML document itself that its looking through and pulling xPath Query out of. So what I did was setup a XML input file which contains the input fields like in the SDK documentation. This works. I discovered that I had to replace all "<" and ">" with "<" and ">" respectively. In the end, this still didn't work (because I hit the exception below) and it's at the point where I hard coded the XML document value directly into the flow (vs its being passed in as an input field):
So one portion of my flow works fine which is multi-instance "String Comparator" which simply looks to see which of the values in the CSV list exists within the XML document. The follow-on logic from the "Success" path off the multi-instance step is where its failing when run through the SDK. It hits a xPath Query step using the following query (the logical.name is replaced for each iteration of the multi-instance step):
//instance[@uniquequery='logical.name="AOXZ1018"']/*[name()="HostName" or name()="Status" or name()="ucmdbID"]
and fails with:
Caught XPathExpressionException. For xpathQuery[//instance[@uniquequery='logical.name="AOXZ1018"']/*[name()="HostName" or name()="Status" or name()="ucmdbID"]]. Exception[org.xml.sax.SAXParseException: Element type "instance" must be followed by either attribute specifications, ">" or "/>".];
The XML looks like this (prettied up a bit):
<?xml version="1.0" encoding="UTF-8"?>
<RetrieveooHostnameListResponse message="Success" returnCode="0" schemaRevisionDate="2012-02-28" schemaRevisionLevel="0" status="SUCCESS" schemaLocation="http://schemas.hp.com/SM/7 http://blah.blah.blah.com:13091/SM/7/ooHostname.xsd">
<instance query="" recordid="AOXZ1018 - computer - In Use" uniquequery="logical.name="AOXZ1018"">
<Status type="String">In Use</Status>
<instance query="" ... [another instance and so on]
In Central the Xpath Query works step fine returning the values of the Hostname, Status, and ucmdbID elements.
I'm very new to the SDK. My Central instance is patched to 9.02.0002 with Content Patch 7 applied. Just for the heck of it I even tried the 9.03_08 SDK and it produces the same exception.