Honored Contributor.. Honored Contributor..
Honored Contributor..

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 "&lt;" and "&gt;" 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=&quot;AOXZ1018&quot;">

          <HostName type="String">AOXZ1018</HostName>

          <Status type="String">In Use</Status>

          <ucmdbID type="String">4ec5aca5ada9dfffcca6d9d4668c8c73</ucmdbID>


      <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.

Labels (1)
2 Replies
Absent Member.. Absent Member..
Absent Member..


It is better you would apply the 9.03 patches to your environments. There are still some bugs within 9.02 version.

Honored Contributor.. Honored Contributor..
Honored Contributor..

You mean the 9.03 SDK or the 9.03 OO Patch ?


The 9.03 Patch may fix stuff but I think it breaks as much as it attempts to fix.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.