Class: WinRM::WSMV::Base

Inherits:
Object
  • Object
show all
Includes:
Header, SOAP
Defined in:
lib/winrm/wsmv/base.rb

Overview

Base class for all WSMV message classes

Constant Summary

Constants included from Header

Header::RESOURCE_URI_CMD, Header::RESOURCE_URI_POWERSHELL

Constants included from SOAP

SOAP::NS_ADDRESSING, SOAP::NS_CIMBINDING, SOAP::NS_ENUM, SOAP::NS_SCHEMA_INST, SOAP::NS_SOAP_ENV, SOAP::NS_TRANSFER, SOAP::NS_WIN_SHELL, SOAP::NS_WSMAN_CONF, SOAP::NS_WSMAN_DMTF, SOAP::NS_WSMAN_FAULT, SOAP::NS_WSMAN_MSFT

Instance Method Summary collapse

Methods included from Header

#action_command, #action_delete, #action_enumerate, #action_enumerate_pull, #action_get, #action_receive, #action_send, #action_signal, #merge_headers, #resource_uri_cmd, #resource_uri_shell, #resource_uri_wmi, #selector_shell_id, #shared_headers

Methods included from SOAP

#namespaces

Instance Method Details

#buildObject

Builds the WSMV message XML payload



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/winrm/wsmv/base.rb', line 29

def build
  builder = Builder::XmlMarkup.new
  builder.instruct!(:xml, encoding: 'UTF-8')
  builder.tag! :env, :Envelope, namespaces do |env|
    env.tag!(:env, :Header) do |env_header|
      create_header(env_header)
    end
    env.tag!(:env, :Body) do |env_body|
      create_body(env_body)
    end
  end
end