WS SDK Professional Edition Development Utilities
Mofcomp
The mofcomp utility parses Managed Object Format (MOF) files, verifies syntax and optionally compiles CIM Qualifiers types, classes and instances in MOF files into the CIM Repository
Run mofcomp 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 mofcomp utility can be invoked by typing mofcomp at the command prompt.
The command line syntax for the mofocmp utility is included below.
C:> cd \Program Files\ws\sdk\bin
C:> mofcomp -h
Options:
-c Syntax
Checking Only
-d Display debug information
-h Display
this usage statement
-i <name> Interop namespace
-kf <file> KeyStore File (Mutual Authentication)
-kp <password> KeyStore Password (Mutual Authentication)
-l <locales> List of locales in priority order
-n <name> Namespace
-o <dir> Directory to output files
-p <credential> WBEM
Server credential (e.g. password)
-q Quiet mode
-s <server> WBEM
Server URL
-tf <file> TrustStore File (Mutual Authentication)
-u <principal> WBEM Server principal (e.g. username)
-v Display the version information
-wp WBEM Protocol (e.g. CIM-XML, CLP, ...)
-m Allow modification of elements (Qualifier Type, Classes,
Instances,...) if they exist
Commands:
MOFFILE MOF File Name
Examples:
mofcomp myschema.mof
mofcomp -s https://localhost/interop -u uname -p pwd myschema.mof
mofcomp -n test -u uname -p pwd
myschema.mof
Default Values
The following tables shows the default values of each of the option arguments. If an option is not listed, then it has no default value.
Option | Description | Default |
---|---|---|
-c | Syntax checking only | FALSE |
-d | Display XML Debug Information | FALSE |
-h | Display this usage statement | FALSE |
-i <namespace> | Interop namespace to use | interop |
-m | Allow modification of CIM Elements | FALSE |
-n <namespace> | Namespace to compile CIM Elements to | interop |
-p <credential> | WBEM Server credential (e.g. Password) | guest |
-q | Quiet mode | FALSE |
-s <server> | WBEM Server | Https://localhost/interop |
-u <principal> | WBEM Server principal (e.g. Username) | guest |
-v | Display the version information | FALSE |
-wp | WBEM Protocol | CIM-XML |
Exit Codes
The following exit codes can be returned
Exit Code | Description |
---|---|
0 | Success |
-1 | MOFCOMP error encountered |
-2 | File not found |
-3 | Unknown error |
Examples:
Compile cim_schema_2.24.1.mof using principal guess and password guess
Arguments:
-s https://localhost/interop | Connect to the interop namespace of the Server running on the local system using an https connection |
-n cimv2241 | namespace |
-u guess | principal (username) guess |
-p guess | credential (password) guess |
..\..\standards\dmtf\schema\2.24.1\final\cim_schema_2.24.1Final-MOFs\cim_schema_2.24.1.mof | MOF file |
The following shows the command and the result
For more information about the the WS products please contact sales.