| Module | WsMan |
| In: |
rwsman_xmlattr.c
rwsman_xmldoc.c rwsman_xmlnode.c rwsmanc_identify.c rwsman_client.c rwsman_clientoption.c rwsman.c |
WsMan is the module namespace for all openwsman client bindings
The bindings itself can be devided in two major parts
Executing a WS-Man action comprises the following steps
Some result classes (like Identify) are derived from XmlDoc and define specific accessor functions for well known xml nodes within the SOAP result. Most just return the raw SOAP based XML document and do not imply any structure.
Example:
# set up client connection
client = WsMan::Client.new( "http", "vista.windows.org", "80", "/wsman", "wsman", "secret" )
# set up action options
options = WsMan::ClientOption.new
options.selector_add( "Name", "Themes" )
# run 'invoke' action
uri = "http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/Win32_Service"
result = client.invoke( "uri", "StopService", options )
puts "Error" result.body.child.name == "Fault" # first child of SOAP body == "Fault" ?
| NS_SOAP | = | "http | //www.w3.org/2003/05/soap-envelope" | |
| NS_WSMAN | = | "http | //schemas.dmtf.org/wbem/wsman/1/wsman.xsd" | |
| NS_NAMESPACES | = | "http | //www.w3.org/XML/1998/namespace" | |
| NS_ADDRESSING | = | "http | //schemas.xmlsoap.org/ws/2004/08/addressing" | |
| NS_DISCOVERY | = | "http | //schemas.xmlsoap.org/ws/2004/10/discovery" | |
| NS_EVENTING | = | "http | //schemas.xmlsoap.org/ws/2004/08/eventing" | |
| NS_ENUMERATION | = | "http | //schemas.xmlsoap.org/ws/2004/09/enumeration" | |
| NS_TRANSFER | = | "http | //schemas.xmlsoap.org/ws/2004/09/transfer" | |
| NS_SCHEMA | = | "http | //www.w3.org/2001/XMLSchema" | |
| NS_SCHEMA_INSTANCE | = | "http | //www.w3.org/2001/XMLSchema-instance" | |
| NS_WSMAN_ID | = | "http | //schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd" |
Set openwsman debug level.
/*
* call-seq:
* WsMan::debug = 1
* WsMan::debug = 0
*
* Set openwsman debug level.
*/
static VALUE
rwsman_debug_set( VALUE module, VALUE dbg )
{
static int init = 0;
int d = FIX2INT( dbg );
if (!init && d != 0) {
init = 1;
debug_add_handler( debug_message_handler, DEBUG_LEVEL_ALWAYS, NULL );
}
wsman_debug_set_level( d );
return Qnil;
}