The code segment in Example 6-15 first creates a namespace and then uses the deleteNameSpace method to delete it.
{ /* Creates a namespace object on the client to contain the namespace parameters, args[0] (host name) and args[1] (namespace name). */ CIMNameSpace cns = new CIMNameSpace (args[0], args[1]); /* Connects to the CIM Object Manager and passes it the namespace object. */ CIMClient cc = new CIMClient (cns); /* Passes the CIM Object Manager a namespace object containing a null host argument (we are not changing the CIM Object Manager host) and the name of the namespace to be deleted. */ CIMNameSpace cop = new CIMNameSpace("", args[2]); /* Delete namespace cop. */ cc.deleteNameSpace(cop); |