Discovering
Platforms |
 |
HP WBEM Services for HP-UX listens for HTTP communication
on port 5989 (for encrypted communication, the default behavior)
or 5988 (for unencrypted communication). A client can attempt to
connect to either of these ports to determine if a CIM Server is
running.
Discovering namespaces |
 |
When a client can successfully issue requests to a system
on which HP WBEM Services for HP-UX is running, it can determine
what namespaces exist by performing an enumerateInstanceNames operation on a special class named __namespace (not case sensitive), specifying the root namespace in the operation. (Note that this functionality is deprecated
by the DMTF, to be replaced by another mechanism, and support may
be discontinued at some future date.) The following code fragment
shows an example:
#include <Pegasus/Client/CIMClient.h>int main(){CIMClient c;Array<CIMObjectPath> namespaces;...namespaces = c.enumerateInstanceNames("root","__namespace");} |
Discovering
Classes |
 |
Once a namespace of interest has been identified, the process of discovering
classes is straightforward. One can use the enumerateClassNames and enumerateClasses operations to retrieve subclasses of any class in the namespace. Specifying NULL for the class name will begin enumeration
at the root level in the namespace. A value of true will return all derived classes. The CIM_ERR_INVALID_CLASS status will be returned if the specified class does not
exist.
Thus, for a client to discover if schema of interest is supported
on the target platform, it can perform enumerateClassNames operations for the classes that it would use. If the
client is capable of using properties or methods in subclasses,
the enumerateClasses operation can be used to obtain the properties and methods
defined for the subclasses.