BESAPI.XMLImporter

The XML Importer provides the main functionality of the Server API. Use it to import a special XML file, with the extension of .bes, into the platform engine for evaluation.

Note: Although the console lets you import BES XML documents with computer groups in them, the BESAPI.XMLImporter object does not support the creation of computer groups.
XMLImporter Methods Description
HRESULT SetAppName (
      BSTR appName
);
Set the Application Name string that is used to specify the registry key for the BESAPI. Default is 'BESAPI'.
HRESULT SetDSN (
      BSTR dsn
);
Set the name of the ODBC DSN to use when connecting to the database. Default is 'BES_bfenterprise'.
HRESULT ImportFile (
      BSTR xmlFilePath,
   BSTR customSiteName,
      BSTR username, 
      BSTR password,
      [out, retval] VARIANT *ids
);
Connects to the database with the username and password. Reads the contents of the specified xml file, and imports it into the database, by using the specified custom site name, or if that is the empty string, then the operator's action site, or the master action site, if the operator is a master operator. It returns an array containing the database IDs of the objects created. Note that only one site is propagated, so importing more than one object, or by using the auto activate analysis' feature might result in an object being created in the database without propagating that object to the BES agents.
HRESULT Import (
      SAFEARRAY(byte) xml,
    BSTR customSiteName,
      BSTR username, 
      BSTR password,
   [out, retval] VARIANT *ids
);
Connects to the database with the username and password. Imports the xml specified into the database, with the specified custom site name, or if that is the empty string, then the operator's action site, or the master action site, if the operator is a master operator. Returns an array containing the database IDs of the objects created.
HRESULT ImportAction (
    SAFEARRAY(byte) actionXML,
    SAFEARRAY(byte) targetXML,
    UINT sourceSiteID,
    UINT sourceFixletID,
    BSTR username,
    BSTR password,
    [out, retval] long *id
);
Connects to the database with the username and password. Imports the action specified by the actionXML, by using the targetXML for targeting endpoints, and by using the specified source information. The appropriate site (operator site or master action site) is propagated depending on whether or not the username refers to a master operator. Returns an integer containing the database id of the action object created.
XMLImporter Properties Description
HRESULT DiagnosticMessage (
      [out, retval] BSTR *pVal
);
If a method fails, this property returns a string containing a diagnostic message.
HRESULT StatusMessage (
      [out, retval] BSTR *pVal
);
Returns a string describing the status of the current operation (for example, propagation).
HRESULT CurrentFIPSMode(
   BSTR username, 
   BSTR password, 
   [out, retval] BOOL* pVal );
This is a function added in version 7.1 to every BESAPI interface. It retrieves the masthead from the database and returns true if FIPS mode cryptography is enabled in the masthead.