If you are using sample clients supplied by VMware, check the documentation to be sure that the samples are intended to work with the CIM server to which you are trying to connect. The samples might hard-code parameters, such as the port and namespace, that affect the connection.

For example, the C++ code in the CIM Storage Management API Programming Guide connects to the CIM server included with ESX Server 3.0, but does not connect to the CIM server included with ESX 4 or later.