WS SDK Professional Edition Development Utilities

« Back to SDK Product page

mofmorph

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 WBEM Solutions, Inc.
Use is Subject to License Terms.
Options:
-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
Commands:
Format Format of the output (XSD, XML, MOF, ...)
Mapping Mapping to use (WS-CIM, xmlCIM, ...)
MOFFILE The MOF file
Examples:
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

Example

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 cim_schema_2.24.1Final-MOFs.zip
creating
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

Arguments:

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

..\..\standards\dmtf\schema\2.24.1\final\cim_schema_2.24.1.mof

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 ..
\..\standards\dmtf\schema\2.24.1\final\cim_schema_2.24.1.mof
Processing CIM_ManagedElement
:
Processing CIM_CASignsPublicKeyCertificate
Generating HTML...
Removing Temporary Files...
MOFMorph completed successfully.
C:> cd cimv224\html
C:> dir /b
allclasses.html
CIM_AbstractIndicationSubscription.html
CIM_AcceptCredentialFrom.html
CIM_AccessControlInformation.html
CIM_AccessLabelReader.html
:
index.html
:
PRS_Statement.html
PRS_StatementFeature.html
PRS_Transaction.html
schema.html
C:>

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 WBEM Solutions products please contact sales.