module WinRM::WSMV::Header
SOAP
header utility mixin
Constants
- RESOURCE_URI_CMD
WSMan URI of the regular Windows cmd shell
- RESOURCE_URI_POWERSHELL
WSMan URI for PowerShell
Public Instance Methods
action_command()
click to toggle source
# File lib/winrm/wsmv/header.rb, line 126 def action_command { "#{SOAP::NS_ADDRESSING}:Action" => 'http://schemas.microsoft.com/wbem/wsman/1/windows/shell/Command', :attributes! => { "#{SOAP::NS_ADDRESSING}:Action" => { 'mustUnderstand' => true } } } end
action_delete()
click to toggle source
# File lib/winrm/wsmv/header.rb, line 114 def action_delete { "#{SOAP::NS_ADDRESSING}:Action" => 'http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete', :attributes! => { "#{SOAP::NS_ADDRESSING}:Action" => { 'mustUnderstand' => true } } } end
action_enumerate()
click to toggle source
# File lib/winrm/wsmv/header.rb, line 174 def action_enumerate { "#{SOAP::NS_ADDRESSING}:Action" => 'http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate', :attributes! => { "#{SOAP::NS_ADDRESSING}:Action" => { 'mustUnderstand' => true } } } end
action_enumerate_pull()
click to toggle source
# File lib/winrm/wsmv/header.rb, line 186 def action_enumerate_pull { "#{SOAP::NS_ADDRESSING}:Action" => 'http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull', :attributes! => { "#{SOAP::NS_ADDRESSING}:Action" => { 'mustUnderstand' => true } } } end
action_get()
click to toggle source
# File lib/winrm/wsmv/header.rb, line 102 def action_get { "#{SOAP::NS_ADDRESSING}:Action" => 'http://schemas.xmlsoap.org/ws/2004/09/transfer/Get', :attributes! => { "#{SOAP::NS_ADDRESSING}:Action" => { 'mustUnderstand' => true } } } end
action_receive()
click to toggle source
# File lib/winrm/wsmv/header.rb, line 138 def action_receive { "#{SOAP::NS_ADDRESSING}:Action" => 'http://schemas.microsoft.com/wbem/wsman/1/windows/shell/Receive', :attributes! => { "#{SOAP::NS_ADDRESSING}:Action" => { 'mustUnderstand' => true } } } end
action_send()
click to toggle source
# File lib/winrm/wsmv/header.rb, line 150 def action_send { "#{SOAP::NS_ADDRESSING}:Action" => 'http://schemas.microsoft.com/wbem/wsman/1/windows/shell/Send', :attributes! => { "#{SOAP::NS_ADDRESSING}:Action" => { 'mustUnderstand' => true } } } end
action_signal()
click to toggle source
# File lib/winrm/wsmv/header.rb, line 162 def action_signal { "#{SOAP::NS_ADDRESSING}:Action" => 'http://schemas.microsoft.com/wbem/wsman/1/windows/shell/Signal', :attributes! => { "#{SOAP::NS_ADDRESSING}:Action" => { 'mustUnderstand' => true } } } end
merge_headers(*headers)
click to toggle source
Merge the various header hashes and make sure we carry all of the attributes through instead of overwriting them.
# File lib/winrm/wsmv/header.rb, line 32 def merge_headers(*headers) hdr = {} headers.each do |h| hdr.merge!(h) do |k, v1, v2| v1.merge!(v2) if k == :attributes! end end hdr end
resource_uri_cmd()
click to toggle source
# File lib/winrm/wsmv/header.rb, line 86 def resource_uri_cmd resource_uri_shell(RESOURCE_URI_CMD) end
resource_uri_shell(shell_uri)
click to toggle source
Helper methods for SOAP
Headers
# File lib/winrm/wsmv/header.rb, line 76 def resource_uri_shell(shell_uri) { "#{SOAP::NS_WSMAN_DMTF}:ResourceURI" => shell_uri, :attributes! => { "#{SOAP::NS_WSMAN_DMTF}:ResourceURI" => { 'mustUnderstand' => true } } } end
resource_uri_wmi(namespace = 'root/cimv2/*')
click to toggle source
# File lib/winrm/wsmv/header.rb, line 90 def resource_uri_wmi(namespace = 'root/cimv2/*') { "#{SOAP::NS_WSMAN_DMTF}:ResourceURI" => "http://schemas.microsoft.com/wbem/wsman/1/wmi/#{namespace}", :attributes! => { "#{SOAP::NS_WSMAN_DMTF}:ResourceURI" => { 'mustUnderstand' => true } } } end
selector_shell_id(shell_id)
click to toggle source
# File lib/winrm/wsmv/header.rb, line 198 def selector_shell_id(shell_id) { "#{SOAP::NS_WSMAN_DMTF}:SelectorSet" => { "#{SOAP::NS_WSMAN_DMTF}:Selector" => shell_id, :attributes! => { "#{SOAP::NS_WSMAN_DMTF}:Selector" => { 'Name' => 'ShellId' } } } } end