WS SDK Professional Edition Development Utilities

« Back to SDK Product page


The mofmorph utility processes CIM Classes defined in a MOF file and converts them to the following formats:

  • HTML
  • XML based on the xmlCIM mapping
  • XSD based on the WS-CIM mapping
  • Provider source code template written in Java using the JSR48 WBEM API
  • Client source code template written in Java using the JSR48 WBEM API
  • Provider source code template written in C using the CMPI API

Run mofmorph from the following directory

Platform Directory
Windows C:\Program Files\ws\sdk\bin
Linux /usr/ws/sdk/bin
Solaris /opt/ws/sdk/bin

Command Line Syntax

The mofmorph utility can be invoked by typing mofmorph at the command prompt.

The command line syntax for the mofmorph utility is included below.

MOFMorph [options] Format Mapping MOFFILE
Copyright (c) 2002-2010 WS, Inc.
Use is Subject to License Terms.
-h Display this usage statement
-o <dir> Directory to output files
-q Quiet mode
-v Display the version information
-cp <name=value,*> Custom Properties
-r <dir> Use Existing Repository Directory
Format Format of the output (XSD, XML, MOF, ...)
Mapping Mapping to use (WS-CIM, xmlCIM, ...)
mofmorph -o outdir XSD WS-CIM WBEMSolutions_Schema.mof
mofmorph -o outdir XML xmlCIM WBEMSolutions_Schema.mof
Available Formats:
WS-CIM - xsd
xmlCIM - xml
Java - client,provider
HTML - wsi
C - cmpi

Default Values

The following table shows the default values for each of the option arguments.

If an option is not listed, then it has no default value.

Option Description Default
-h Display this usage statement FALSE
-o <dir> Directory to output files <current directory>
-cp Custom Properties null
-q Quiet mode FALSE
-v Display the version information FALSE


The following examples assume that the DMTF CIM Schema v2.23 has been extracted as follows:

C: \> cd \Program Files\ws\standards\dmtf\schema\2.24.1\final
C: \> unzip
creating Application/
inflating Application/CIM_Action.mof
inflating User/CIM_VerificationService.mof
C: \>

Generate HTML files

The following command generates HTML files for each class in the DMTF CIM Schema v2.24


-o cimv224\html Directory for output
wsi Generate WS, Inc style JavaDoc
HTML Use HTML mapping


The following shows the command and the results.

C:> cd \Program Files\ws\sdk\bin
C:> mkdir cimv224
C:> mkdir cimv224\html
C:> mofmorph -o cimv224\html wsi HTML ..
Processing CIM_ManagedElement
Processing CIM_CASignsPublicKeyCertificate
Generating HTML...
Removing Temporary Files...
MOFMorph completed successfully.
C:> cd cimv224\html
C:> dir /b

This example reads and processes all the classes referenced in cim_schema_2.24.1.mof and generates a set of HTML files in subdirectory cimv224\html. One JavaDoc style HTML file is generated for each CIM class in the CIM 2.24 Schema. For example, for CIM_ManagedElement, mofmorph generates CIM_ManagedElement.html.

mofmorph also generates an index.html file that references all of the individual .html files.

NOTE: If the -o option were not used, then all files are created in the current directory.

The following shows the contents of the generated CIM_AccountIdentity HTML page:

mofmorph screenshot

Back to Top

For more information about the the WS products please contact sales.