Solaris WBEM SDK Developer's Guide

Chapter 2 Creating JavaBeans Using the MOF Compiler

This chapter provides an overview of the Managed Object Format (MOF) Compiler, and describes how to create JavaBeans using the -j option with the mofcomp command. This chapter covers the following topics.


Note -

For more information on the MOF Compiler, see mofcomp(1M).


About The MOF Compiler

Managed Object Format (MOF) is a compiled language developed by the Distributed Management Task Force (DMTF) to define static and dynamic classes and instances for CIM and WBEM. You can use the CIM and Solaris MOFs that are included with Solaris WBEM Services, and you can create your own MOFs. For more information on creating your own MOFs using the DMTF's MOF language, see the DMTF Website at http://www.dmtf.org.

The MOF Compiler, mofcomp(1M), parses MOF files, converts the classes and instances to Java classes, and then adds the classes to the CIM Object Manager Repository in the default (root\cimv2) or other specified namespace. Because you can easily convert MOF files to Java, Java-based applications can interpret and exchange the data contained within MOF files on any machine that runs a Java Virtual Machine.

During a Solaris installation, the MOF Compiler automatically compiles the bundled MOF files that describe the CIM and Solaris Schema and adds them to the CIM Object Manager Repository.

Generating JavaBeans Using mofcomp

In the context of WBEM, JavaBeansTM or beans, define methods and instances for accessing and manipulating CIM classes and data elements. To simplify your development efforts, you can use the -j option with the mofcomp command to automatically generate JavaBeans that represent the CIM classes defined in your MOF files. These automatically-generated JavaBeans define the interfaces; it is up to you to add the implementation code.


Note -

To safeguard your program from changes that you make to the underlying JavaBeans implementation, use the interfaces rather than the original JavaBeans.


When you specify the -j option with mofcomp, a base Java interface named CIMBean.java and a base bean that implements the interface named CIMBeanImpl.java is generated. CIMBeanImpl.java contains all of the code that is common to the generated beans. All generated Java interfaces inherit from CIMBean.java and all generated beans inherit from CIMBeanImpl.java, consequently inheriting the base implementation.

For each CIM class that is defined in a MOF file, The MOF Compiler JavaBeans Generation Feature generates a Java interface that contains the following:

The Java interfaces are named CIMClassBean.java. Bean classes that implement those Java interfaces are named CIMClassBeanImpl.java. In addition, accessor methods for properties that contain the CIM DisplayName, Units, and Version qualifiers are generated.

For each invokeMethod that contains an OUT qualified parameter in a CIM class, a container interface that holds the output that the invoking of the method generates is generated. These interfaces are named CIMClass_MethodNameOutput.java. An instance of this CIMClass_MethodNameOutput.java container interface is required as the last parameter of the bean's method. This container interface is required because the Object datatype or datatypes that the bean's method takes as parameters are not mutatable, and therefore they cannot be used to hold both input and output data.

MOF File Elements

You must include the PACKAGE element in your MOF file to take advantage of the -j option. In addition, you can specify the IMPORTS and EXCEPTIONS elements, in the following format:

PACKAGE=NameOfJavaPackage
IMPORTS=JavaClassName1:JavaClassName2:...
EXCEPTIONS=Exception1:Exception2:...

Th following table describes these elements.

Table 2-1 MOF File Elements

Element 

Description 

PACKAGE

Required. Specifies the name of the Java package that contains the source files generated by the MOF Compiler. 

IMPORTS

Optional. Specifies the name(s) of the Java classes to import into the generated source files, separated with a colon (:). You can specify as many Java classes as you want, on as many lines as you want. 

EXCEPTIONS

Optional. Specifies the name(s) of the Java exceptions included in the generated source files, separated with a colon (:). You can specify as many Java class exceptions as you want, on as many lines as you want. 


Note -

If you specify EXCEPTIONS, you must specify IMPORTS.


How CIM Maps to Java

The following table describes how CIM elements map to Java elements.

Table 2-2 How CIM Elements Map to Java Elements

CIM Element 

Java Element 

Class 

The CIM class name is used as the basis for the name of the generated Java source files. The generated Java classes follow the same inheritance as defined in the class-subclass relationships in the MOF. 

Property 

An accessor and a mutator method is created for each CIM property. The CIM property name is used as the basis for the related accessor and mutator methods. 

Method 

For each CIM method, a comparable Java method is created. The method name is used as the basis for the related Java method name. The return value is the same, accounting for the Java data type mapping. Input and output parameters are used as arguments to the Java method. Output parameters are not directly included in the method signature, but rather are encapsulated in an output container object which is included as a method parameter. 

Qualifier 

Qualifiers are described in Table 2–4 and Table 2–5.

Association 

Nothing specific required. 

Indication 

Nothing specific required. 

Reference 

For each CIM reference, a reference to a generated Java interface is created. 

Trigger 

Nothing specific required. 

Schema 

Nothing specific required. 

The following table describes how CIM data types map to Java data types.

Table 2-3 How CIM Data Types Map to Java Data Elements

CIM Data Type 

Java Data Type 

Accessor Method 

Mutator Method 

uint8 X 

UnsignedInt8 

UnsignedInt8 getX(); 

void setX(UnsignedInt8 x); 

sint8 X 

Byte 

Byte getX(); 

void setX(Byte x); 

uint16 X 

UnsignedInt16 

UnsignedInt16 getX(); 

void setX(UnsignedInt16 x); 

sint16 X 

Short 

Short getX(); 

void setX(Short x); 

uint32 X 

UnsignedInt32 

UnsignedInt32 getX(); 

void setX(UnsignedInt32 x); 

sint32 X 

Integer 

Integer getX(); 

void setX(Integer x); 

uint64 X 

UnsignedInt64 

UnsignedInt64 getX(); 

void setX(UnsignedInt64 x); 

sint64 X 

Long 

Long getX(); 

void setX(Long x); 

String X 

String 

String getX(); 

void setX(String x); 

Boolean X 

Boolean 

Boolean isX(); 

void setX(Boolean x); 

real32 X 

Float 

Float getX(); 

void setX(Float x); 

real64 X 

Double 

Double getX(); 

void setX(Double x); 

DateTime X 

CIMDateTime 

CIMDateTime getX(); 

void setX(CIMDateTime x); 

Reference X 

CIMObjectPath 

CIMObjectPath getX(); 

void setX(CIMObjectPath x); 

char16 X 

Character 

Character getX(); 

void setX(Character x); 

The following table lists the meta qualifiers that refine the definition of the meta constructs in the model. These qualifiers are mutually exclusive and are used to refine the actual usage of an object class or property declaration within the MOF syntax.

Table 2-4 Meta Qualifiers

Qualifier 

Scope 

Type 

Meaning 

Association 

class 

Boolean 

No affect on mapping 

Indication 

class 

Boolean 

Class is abstract 

The following table lists the standard qualifiers and the affect that they have on the mapping of a CIM object to a bean. There is no support for optional qualifiers. JavaDoc is produced for each interface and class based on this mapping.

Table 2-5 Standard Qualifiers

Qualifier 

Scope 

Meaning 

ABSTRACT 

Class, Association, Indication 

The class is abstract and has no effect on the Java interfaces 

DESCRIPTION 

Any 

The information provided generates JavaDoc comments in the source file 

DISPLAYNAME 

Property 

An accessor method for the display name is created: 

public String displayNameForProperty();

IN 

Parameter 

Determines the method signature 

OUT 

Parameter 

Determines the Method Parameter signature and return values 

TERMINAL 

Class 

Class or Interface is Final 

UNITS 

Property, Method, Parameter 

Another accessor method is created: 

public String getpropertyUnits();

VALUMAP 

Property, Method, Parameter 

Beans contain generated constants for each property in a CIM class that has a CIM ValueMap or a Values qualifier. How the constant name and constant value is obtained to generate these class variables depends on the data type of the property and which of the qualifiers the property possesses.  


Note -

The ValueMap and Values qualifiers as defined in the CIM specification have meanings contrary to what the qualifier names might imply. ValueMap defines the legal set of values for a property and Values provides translation between an integer value and a string.


VALUES 

Property, Method, Parameter 

Beans contain generated constants for each property in a CIM class that has a CIM ValueMap or a Values qualifier. How the constant name and constant value is obtained to generate these class variables depends on the data type of the property and which of these qualifiers the property possesses.  


Note -

The ValueMap and Values qualifiers as defined in the CIM specification have meanings contrary to what the qualifier names might imply. ValueMap defines the legal set of values for a property and Values provides translation between an integer value and a string.


VERSION 

Class, Schema, Association, Indication 

Class possesses a getClassVersion() method

The following table describes how MOF elements map to Java elements.

Table 2-6 How MOF Elements Map to Java Elements

MOF Element 

Java Element 

Description Qualifier 

Description of the class, property, or method 

Complete MOF representation of the class 

The class JavaDoc description for both the Java interface and the implementing bean 

Generating JavaBeans Example

Following is an example that shows the JavaBeans that are produced when you use the mofcomp command with the -j option.

You must run the mofcomp command as root or as a user with write access to the namespace in which you are compiling.


Note -

Avoid specifying both the -u (user) -p (password) options when running the mofcomp command, as you must type in your password directly on the command line. Instead, specify only the -u option so that you are prompted to specify an encrypted password.



Example 2-1 Generating JavaBeans


/usr/sadm/bin/mofcomp -u root -p mypassword -o /tmp 
-j /tmp/bean.txt /usr/sadm/mof/Simple.mof

Following is the content of /usr/sadm/mof/Simple.mof:


/usr/sadm/mof/Simple.mof
-------------------
#pragma include ("CIM_Core26.mof")

class Simple_Class {

      [Key, Description ("Name of the class.") ]
   string Name;

      [Description ("Method to print the contents of the class.") ]
   string printClass();

};

Following is the content of /tmp/bean.txt:


/tmp/bean/txt
----------
PACKAGE=foo.com
IMPORTS=java.lang.Exception
EXCEPTIONS=Exception

Following is the content of CIMBean.java:

package foo.com;

import javax.wbem.cim.CIMException;
import javax.wbem.client.CIMOMHandle;
import javax.wbem.cim.CIMInstance;

/**
 * This Interface defines the methods that must be implemented by 
 *  CIMBeanImpl and its subclasses. CIMBeanImpl constitutes the base
 *  class of the Java source generated by 'mofcomp -j'. 
 */
public interface CIMBean {

    /**
     * This method returns the CIMBean's CIMOMHandle.
     * 
     * @return	CIMOMHandle	handle to the CIMOM
     */
    public CIMOMHandle getCIMOMHandle();

    /**
     * This method sets the CIMBean's CIMOMHandle to the specifed value.
     * 
     * @param	CIMOMHandle	handle to the CIMOM
     */
    public void setCIMOMHandle(CIMOMHandle handle);

    /**
     * This method returns the CIMBean's CIMInstance.
     * 
     * @return	CIMInstance	handle to the CIMInstance being managed
     */
    public CIMInstance getCIMInstance();

    /**
     * This method sets the CIMBean's CIMInstance to the specified value.
     * 
     * @param	CIMInstance	handle to the CIMInstance being managed
     */
    public void setCIMInstance(CIMInstance instance);

    /**
     * This method makes the remote call to update the CIMInstance in the 
     * CIMOM. 
     */
    public void update() throws CIMException;

    /**
     * This method makes the remote call to update the specified 
     * CIMProperty of the CIMInstance in the CIMOM. 
     * 
     * @param	String	property name to update in the CIMInstance
     * @param	Object	property value to update in the CIMProperty
     */
    public void update(String propName, Object value) throws CIMException;

    /**
     * This method makes the remote call to delete the CIMInstance in the 
     * CIMOM. 
     */
    public void delete() throws CIMException;

    /**
     * This method returns a string array of the Key qualified property 
     * name(s) in the CIMInstance. This is needed to build the 
     * CIMObjectPath for the CIMInstance if it does not contain any 
     * qualifier information. 
     * 
     * @return String Version qualifier value or "-1" if there isn't 
     * one
     */
    public String[] getBeanKeys();

    /**
     * This method returns the CIM class's Version qualifier value or 
     * '-1'if it does not have this qualifier. 
     * 
     * @return	String[]	array of the key qualified property names
     */
    public String getBeanVersion();

    /**
     * This method returns a string representation of the CIMBean. 
     * This method is intended for debug purposes and the format of the 
     * string may vary from implementation to implementation. The string 
     * returned may be empty, but may not be null. 
     * 
     * @return	String	string representation of the Bean
     */
    public String toString();

} // Interface CIMBean

Following is the content of CIMBeanImpl.java:

package foo.com;

import java.io.Serializable;
import java.util.*;
import javax.wbem.client.CIMOMHandle;
import javax.wbem.cim.CIMException;
import javax.wbem.cim.CIMInstance;
import javax.wbem.cim.CIMObjectPath;
import javax.wbem.cim.CIMValue;
import javax.wbem.client.CIMOMHandle;

/**
 * This Class implements the CIMBean Interface. It is the base Class 
 * of the Java source code generated by 'mofcomp -j'. 
 */
public class CIMBeanImpl implements CIMBean, Serializable {

    private CIMInstance	cimInstance = null;
    private CIMOMHandle	cimomHandle = null;

    /**
     * This default constructor takes no parameters and creates an empty 
     * instance of CIMBeanImpl. 
     */
    public CIMBeanImpl() {

	super();

    } // constructor

    /**
     * This constructor takes the specified CIMOMHandle and CIMInstance and 
     * creates a CIMBeanImpl. 
     * 
     * @param	CIMOMHandle	handle to the CIMOM
     * @param	CIMInstance	handle to the CIMInstance being managed
     */
    public CIMBeanImpl(CIMOMHandle handle, CIMInstance instance) {

	super();
	cimomHandle = handle;
	cimInstance = instance;

    } // constructor

    /**
     * This method returns the CIMBean's CIMOMHandle.
     * 
     * @return	CIMOMHandle	handle to the CIMOM
     */
    public CIMOMHandle getCIMOMHandle() {

	return (cimomHandle);

    } // getCIMOMHandle

    /**
     * This method sets the CIMBean's CIMOMHandle to the specifed value.
     * 
     * @param	CIMOMHandle	handle to the CIMOM
     */
    public void setCIMOMHandle(CIMOMHandle handle) {

	this.cimomHandle = handle;

    } // setCIMOMHandle

    /**
     * This method returns the CIMBean's CIMInstance.
     * 
     * @return	CIMInstance	handle to the CIMInstance being managed
     */
    public CIMInstance getCIMInstance() {

	return (cimInstance);

    } // getCIMInstance

    /**
     * This method sets the CIMBean's CIMInstance to the specified 
     * value.
     * 
     * @param	CIMInstance	handle to the CIMInstance being managed
     */
    public void setCIMInstance(CIMInstance instance) {

	this.cimInstance = instance;

    } // setCIMInstance

    /**
     * This method makes the remote call to update the CIMInstance in 
     * the CIMOM. 
     */
    public void update() throws CIMException {

	cimomHandle.setInstance(getObjectPath(), cimInstance);

} // update

    /**
     * This method makes the remote call to update the specified 
     * CIMProperty of the CIMInstance in the CIMOM. 
     * 
     * @param	String	property name to update in the CIMInstance
     * @param	Object	property value to update in the CIMProperty
     */
    public void update(String propName, Object value) throws CIMException {

	cimomHandle.setProperty(getObjectPath(), propName, new CIMValue(value));

    } // update

    /**
     * This method makes the remote call to delete the CIMInstance in the 
     * CIMOM. 
     */
    public void delete() throws CIMException {

	cimomHandle.deleteInstance(getObjectPath());

    } // delete

    /**
     * This is a convenience method for use by subclasses to get the 
     * Object contained in the given CIMProperty's CIMValue. 
     * NOTE: The Object returned may be null. 
     * 
     * @param	String	property name whose value should be retrieved
     * @return	Object	object contained in the CIMProperty's CIMValue
     */
    protected Object getProperty(String propName) {

	try {

	    return (cimInstance.getProperty(propName).getValue().getValue());

	} catch (NullPointerException npe) {
	}
	return ((Object)null);

    } // getProperty

    /**
     * This is a convenience method for use by subclasses to get 
     * the String[] equivalent to the Vector contained in the given 
     * CIMProperty's CIMValue. 
     * NOTE: The String[] returned may be null. 
     * 
     * @param	String	property name to get the value for
     * @param	String[]	property Values qualifier data
     * @param	Object[]	property ValueMap qualifier data
     * @return	String[]	container of constants for property value
     */
    protected String[] getArrayProperty(String propName, String[] 
    valueArr,	Object[] valueMapArr) {

	List propList = null;
	try {

	    propList =
		((List)cimInstance.getProperty(propName).getValue().getValue());

	} catch (NullPointerException npe) {
	}

	if (propList != null) {

	    String[] returnArr;
	    returnArr = new String[propList.size()];
	    ListIterator listIterator = propList.listIterator();
	    int counter = 0;
	    while (listIterator.hasNext()) {

		returnArr[counter] = valueArr[getArrayIndex(valueMapArr,
		    listIterator.next())];
		counter++;

	    }
	    return (returnArr);

	}
	return ((String[])null);

    } // getArrayProperty

    /**
     * This method gets the CIMInstance referenced by the property 
     * value (i.e., the object path specified) and sets it in the 
     * specified Bean. This method is used by accessor methods of 
     * Association properties. 
     * 
     * @param	CIMObjectPath	object path for the CIMInstance
     * @param	CIMBeanImpl	Bean container for CIMInstance retrieved
     */
    protected void getAssociationProperty(CIMObjectPath cop, 
    CIMBeanImp	bean) throws CIMException {

	cop.setNameSpace("");
	CIMInstance ci = cimomHandle.getInstance(cop, false, true, true,
	    (String[])null);
	bean.setCIMInstance(ci);
	bean.setCIMOMHandle(cimomHandle);

    } // getAssociationProperty

    /**
     * This is a convenience method for use by subclasses to set a 
     * CIMValue containing the specified Object value in the 
     * CIMProperty of the specified name. 
     * 
     * @param	String	property name to set a new value for
     * @param	Object	property value to update in the CIMInstance
     */
    protected void setProperty(String propName, Object propValue)throws
	IllegalArgumentException {

	cimInstance.setProperty(propName, new CIMValue(propValue));

    } // setProperty

    /**
     * This is a convenience method for use by subclasses to set a 
     * CIMValue containing a Vector equivalent to the specified 
     * String[] in the CIMProperty of the specified name. 
     * 
     * @param	String	property name to get the value for
     * @param	String[]	property Values qualifier data
     * @param	Object[]	property ValueMap qualifier data
     * @param	String[]	property value to set in the CIMInstance
     */
    protected void setArrayProperty(String propName, String[] valueArr,
	Object[] valueMapArr, String[] propValues) {

	Vector vPropValue = new Vector(propValues.length);
	for (int i = 0; i < propValues.length; i++) {

	    vPropValue.addElement(valueMapArr[getArrayIndex(valueArr,
		propValues[i])]);

	}
	setProperty(propName, vPropValue);

    } // setArrayProperty

    /**
     * This method returns a string array of the Key qualified property 
     * name(s) in the CIMInstance. This is needed to build the 
     * CIMObjectPath for the CIMInstance if it does not contain any 
     * qualifier information. 
     * 
     * @return	String[]	array of the key qualified property names
     */
    public String[] getBeanKeys() {

	return ((String[])null);

    } // getBeanKeys

    /**
     * This method returns the CIMObjectPath of the class's CIMInstance.
     * 
     * @return	CIMObjectPath	object path for the CIMInstance
     */
    protected CIMObjectPath getObjectPath() {

	CIMObjectPath cop = new CIMObjectPath(cimInstance.getClassName());
	Vector vKeys = cimInstance.getKeyValuePairs();
	if ((vKeys != null) && (vKeys.size() > 0)) {

	    cop.setKeys(vKeys);

	} else {

	    String[] keyArr = getBeanKeys();
	    if (keyArr != null) {

		String keyProperty;
		for (int i = 0; i < keyArr.length; i++) {

		    keyProperty = keyArr[i];
		    cop.addKey(keyProperty,
			(cimInstance.getProperty(keyProperty)).getValue());

		}

	    }

	}
	return (cop);

    } // getObjectPath

    /**
     * This convenience method returns the index of the specified 
     * object in the specified array, or -1 if the object is not 
     * contained in the array. 
     * 
     * @param	Object[]	Object array to find index of Object in
     * @param	Object	Object to find index of in Object array
     * @return	int	index of Object in Object array
     */
    protected int getArrayIndex(Object[] objArr, Object obj) {

	List arrList = Arrays.asList(objArr);
	return (arrList.indexOf(obj));

    } // getArrayIndex

    /**
     * This method returns the CIM class's Version qualifier value, or 
     * '-1'if it does not have this qualifier. 
     * 
     * @return	String	Version qualifier value or "-1" if there isn't 
     * one
     */
    public String getBeanVersion() {

	return ("-1");

    } // getBeanVersion

    /**
     * This method returns a string representation of the CIMBean. 
     * This method is intended for debug purposes and the format of 
     * the string may vary from implementation to implementation. 
     * The string returned may be empty, but may not be null. 
     * 
     * @return	String	string representation of the Bean
     */
    public String toString() {

	return (cimInstance.toString());

    } // toString

} // Class CIMBeanImpl

Following is the content of Simple_ClassBean.java:

package foo.com;

import javax.wbem.client.*;
import javax.wbem.cim.*;
import java.util.*;
import java.lang.Exception;

/**
 * This Interface contains accessor and mutator methods for all 
 * properties defined in CIM class Simple_Class as well as methods 
 * comparable to the invokeMethods defined for this class. This Interface 
 * is implemented by Simple_ClassBeanImpl. The CIM class Simple_Class is 
 * described as follows: 
 */
public interface Simple_ClassBean extends CIMBean {

    /**
     * This method returns the Simple_Class.Name property value. This 
     * property is described as follows: 
     * 
     * Name of the class.
     * 
     * @return	String	current Name property value
     * @exception	Exception	
     */
    public String getName() throws Exception;

    /**
     * This method sets the Simple_Class.Name property value. This 
     * property is described as follows: 
     * 
     * Name of the class.
     * 
     * @param	String	new Name property value
     * @exception	Exception	
     */
    public void setName(String name) throws Exception;


    /**
     * This method invokes the Simple_Class.printClass() method. This 
     * method is described as follows: 
     * 
     * Method to print the contents of the class.
     * 
     * @return	String	return value of printClass() invokation
     * @exception	Exception	
     */
    public String printClass() throws Exception, CIMException;

} // Interface Simple_ClassBean

Following is the content of Simple_ClassBeanImpl.java:

package foo.com;

import javax.wbem.client.*;
import javax.wbem.cim.*;
import java.util.*;
import java.lang.Exception;

/**
 * This Class contains accessor and mutator methods for all properties 
 * defined in the CIM class Simple_Class as well as methods comparable 
 * to the invokeMethods defined for this class. This Class implements 
 * the Simple_ClassBean Interface. The CIM class Simple_Class is 
 * described as follows: 
 */
public class Simple_ClassBeanImpl extends CIMBeanImpl implements 
    Simple_ClassBean {

     private CIMOMHandle cimomHandle = null;
    private CIMInstance cimInstance = null;
    private final static String[] keysArr = {"Name"};

    /**
     * This constructor creates a Simple_ClassBeanImpl Class which 
     * implements the Simple_ClassBean Interface, and encapsulates the 
     * CIM class Simple_Class in a Java Bean. The CIM class Simple_Class 
     * is described as follows: 
     * 
     * @param	CIMOMHandle	handle to the CIMOM
     * @param	CIMInstance	handle to the CIMInstance being managed
     */
    public Simple_ClassBeanImpl(CIMOMHandle handle, CIMInstance instance) 
	{

 	super(handle, instance);

	this.cimomHandle = handle;
	this.cimInstance = instance;

    } // constructor

    /**
     * This method returns an array of Strings with the names of the key 
     * qualified properties defined for the CIM class. This method is 
     * used to build the CIMObjectPath of the CIMInstance managed by 
     * the Bean in the case that the key qualifiers are not included 
     * in the CIMInstance. 
     * 
     * @return	String[]	array of the key qualified property names
     */
    public String[] getBeanKeys() {

	return keysArr;

    } // getBeanKeys

    /**
     * This method returns the Simple_Class.Name property value. This 
     * property is described as follows: 
     * 
     * Name of the class.
     * 
     * @return	String	current Name property value
     * @exception	Exception	
     */
    public String getName() throws Exception {

	return (String)getProperty("Name");

    } // getName

    /**
     * This method sets the Simple_Class.Name property value. This 
     * property is described as follows: 
     * 
     * Name of the class.
     * 
     * @param	String	new Name property value
     * @exception	Exception	
     */
    public void setName(String name) throws Exception {

	setProperty("Name", name);

    } // setName


    /**
     * This method invokes the Simple_Class.printClass() method. This 
     * method is described as follows: 
     * 
     * Method to print the contents of the class.
     * 
     * @return	String	return value of printClass() invokation
     * @exception	Exception	
     */
    public String printClass() throws Exception, CIMException {

	Vector vInParams = new Vector();
	Vector vOutParams = new Vector();

	CIMValue cv = cimomHandle.invokeMethod(cimInstance.getObjectPath(), 
 "printClass", vInParams, vOutParams);
	return (String)cv.getValue();

    } // printClass
} // Class Simple_ClassBeanImpl