44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/winrm/wsmv/header.rb', line 44
def (session_opts)
{
"#{SOAP::NS_ADDRESSING}:To" => session_opts[:endpoint],
"#{SOAP::NS_ADDRESSING}:ReplyTo" => {
"#{SOAP::NS_ADDRESSING}:Address" =>
'http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous',
:attributes! => {
"#{SOAP::NS_ADDRESSING}:Address" => {
'mustUnderstand' => true
}
}
},
"#{SOAP::NS_WSMAN_DMTF}:MaxEnvelopeSize" => session_opts[:max_envelope_size],
"#{SOAP::NS_ADDRESSING}:MessageID" => "uuid:#{SecureRandom.uuid.to_s.upcase}",
"#{SOAP::NS_WSMAN_MSFT}:SessionId" => "uuid:#{session_opts[:session_id]}",
"#{SOAP::NS_WSMAN_DMTF}:Locale/" => '',
"#{SOAP::NS_WSMAN_MSFT}:DataLocale/" => '',
"#{SOAP::NS_WSMAN_DMTF}:OperationTimeout" =>
Iso8601Duration.sec_to_dur(session_opts[:operation_timeout]),
:attributes! => {
"#{SOAP::NS_WSMAN_DMTF}:MaxEnvelopeSize" => { 'mustUnderstand' => true },
"#{SOAP::NS_WSMAN_DMTF}:Locale/" => {
'xml:lang' => session_opts[:locale], 'mustUnderstand' => false
},
"#{SOAP::NS_WSMAN_MSFT}:DataLocale/" => {
'xml:lang' => session_opts[:locale], 'mustUnderstand' => false
},
"#{SOAP::NS_WSMAN_MSFT}:SessionId" => { 'mustUnderstand' => false }
}
}
end
|