WS SDK Professional Edition Development Utilities

« Back to SDK Product page

wbemextract

The wbemextract generates MOF files containing the class, instance and qualifier definitions from the specified namespace.

Run wbemextract from the following directory

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

NOTE: wbemextract must be run against a running target WBEM Server.

Command Line Syntax

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

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

C:> cd \Program Files\ws\sdk\bin
C:> wbemextract -h
WBEMExtract [options]
Copyright (c) 2002-2010 WBEM Solutions, Inc.
Use is Subject to License Terms.
Options:
-d Display debug information
-h Display this usage statement
-kf <file> KeyStore File (Mutual Authentication)
-kp <password> KeyStore Password (Mutual Authentication)
-l <locales> List of locales in priority order.
-o <dir> Directory to output files
-p <credential> WBEM Server credential (e.g. password)
-ph <host> HTTP Proxy Host
-pp <port> HTTP Proxy Port
-q Quiet mode
-rp <credential> WBEM Server Role credential (e.g. password)
-ru <principal> WBEM Server Role principal (e.g. role to assume)
-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 <protocol> WBEM Protocol (e.g. CIM-XML, WS-Management, ..)
Examples:
WBEMExtract -s https://192.169.0.4/interop
WBEMExtract -s https://192.169.0.4/interop -u jdd -p mypwd
C:>

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
-d Generate all classes XML file with index FALSE
-h Display this usage statement FALSE
-o <dir> Directory to output files <current directory>
-p 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

Example

Extract the instances, classes, qualifiers and schema from the interop namespace.

Arguments:

-u user1 User principal (username) user1
-p pass1 Use credential (password) pass1
-o /tmp Create output files in /tmp directory
-s https://localhost/interop Use Server (namespace)

The following shows the command and the results.

C:> cd \Program Files\ws\sdk\bin
C:> mkdir tmp
C:> wbemextract -s https://localhost/interop -u user1 -p pass1 -o tmp
Connecting to WBEM Server: https://localhost/interop
Searching namespace: /interop
Extracting Qualifier Types....
Extracting Classes....
Extracting Instances....
Extracted 42 qualifier types.
Extracted 100 classes.
Extracted 38 instances.
Extraction Completed!
C:> cd tmp
C:> dir /b *.mof
interop_instances.mof
interop_classes.mof
interop_qualifiers.mof
interop_schema.mof
C:> type interop_schema.mof
/* This file was generated by WBEMExtract from WBEM Solutions, Inc. */
#pragma namespace("/interop")
#pragma include("interop_qualifiers.mof")
#pragma include("interop_classes.mof")
#pragma include("interop_instances.mof")
C:>

This example extracts all the classes from the interop namespace and writes their class definitions to tmp\interop_classes.mof. Similarly, all instances are extracted and their instance definitions written to tmp\interop_instances.mof. Qualifiers are written to tmp\interop_qualifiers.mof. File tmp\interop_schema.mof simply contains #include of the other interop_*.mof files.

After generation, one can use mofcomp to compile all the extracted information into a new repository.

Back to Top

For more information about the the WBEM Solutions products please contact sales.