winrm 2.2.3 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +13 -1
- data/.travis.yml +10 -11
- data/Gemfile +2 -3
- data/README.md +1 -1
- data/Rakefile +3 -4
- data/appveyor.yml +1 -2
- data/bin/rwinrm +90 -97
- data/changelog.md +5 -0
- data/lib/winrm.rb +3 -5
- data/lib/winrm/connection.rb +84 -86
- data/lib/winrm/connection_opts.rb +90 -91
- data/lib/winrm/exceptions.rb +14 -2
- data/lib/winrm/http/response_handler.rb +127 -96
- data/lib/winrm/http/transport.rb +462 -427
- data/lib/winrm/http/transport_factory.rb +1 -5
- data/lib/winrm/output.rb +1 -2
- data/lib/winrm/psrp/fragment.rb +0 -2
- data/lib/winrm/psrp/message.rb +1 -3
- data/lib/winrm/psrp/message_data.rb +0 -2
- data/lib/winrm/psrp/message_data/base.rb +0 -2
- data/lib/winrm/psrp/message_data/error_record.rb +0 -2
- data/lib/winrm/psrp/message_data/pipeline_host_call.rb +0 -2
- data/lib/winrm/psrp/message_data/pipeline_output.rb +48 -54
- data/lib/winrm/psrp/message_data/pipeline_state.rb +0 -2
- data/lib/winrm/psrp/message_data/runspacepool_host_call.rb +0 -2
- data/lib/winrm/psrp/message_data/runspacepool_state.rb +0 -2
- data/lib/winrm/psrp/message_data/session_capability.rb +0 -2
- data/lib/winrm/psrp/message_defragmenter.rb +2 -2
- data/lib/winrm/psrp/message_factory.rb +2 -3
- data/lib/winrm/psrp/message_fragmenter.rb +1 -3
- data/lib/winrm/psrp/powershell_output_decoder.rb +0 -2
- data/lib/winrm/psrp/receive_response_reader.rb +3 -5
- data/lib/winrm/psrp/uuid.rb +1 -2
- data/lib/winrm/shells/base.rb +6 -4
- data/lib/winrm/shells/cmd.rb +63 -65
- data/lib/winrm/shells/power_shell.rb +207 -202
- data/lib/winrm/shells/retryable.rb +44 -45
- data/lib/winrm/shells/shell_factory.rb +0 -2
- data/lib/winrm/version.rb +1 -3
- data/lib/winrm/wsmv/base.rb +0 -2
- data/lib/winrm/wsmv/cleanup_command.rb +1 -2
- data/lib/winrm/wsmv/close_shell.rb +1 -2
- data/lib/winrm/wsmv/command.rb +2 -3
- data/lib/winrm/wsmv/command_output.rb +2 -3
- data/lib/winrm/wsmv/command_output_decoder.rb +1 -2
- data/lib/winrm/wsmv/configuration.rb +0 -2
- data/lib/winrm/wsmv/create_pipeline.rb +0 -2
- data/lib/winrm/wsmv/create_shell.rb +2 -6
- data/lib/winrm/wsmv/header.rb +213 -215
- data/lib/winrm/wsmv/init_runspace_pool.rb +96 -95
- data/lib/winrm/wsmv/iso8601_duration.rb +0 -2
- data/lib/winrm/wsmv/keep_alive.rb +0 -2
- data/lib/winrm/wsmv/receive_response_reader.rb +128 -126
- data/lib/winrm/wsmv/send_data.rb +0 -2
- data/lib/winrm/wsmv/soap.rb +0 -2
- data/lib/winrm/wsmv/wql_pull.rb +54 -56
- data/lib/winrm/wsmv/wql_query.rb +98 -99
- data/lib/winrm/wsmv/write_stdin.rb +0 -2
- data/tests/integration/auth_timeout_spec.rb +0 -1
- data/tests/integration/cmd_spec.rb +2 -3
- data/tests/integration/issue_59_spec.rb +0 -1
- data/tests/integration/powershell_spec.rb +4 -5
- data/tests/integration/spec_helper.rb +3 -6
- data/tests/integration/transport_spec.rb +0 -1
- data/tests/integration/wql_spec.rb +33 -34
- data/tests/matchers.rb +2 -3
- data/tests/spec/configuration_spec.rb +0 -1
- data/tests/spec/connection_spec.rb +0 -2
- data/tests/spec/exception_spec.rb +0 -1
- data/tests/spec/http/transport_factory_spec.rb +1 -3
- data/tests/spec/http/transport_spec.rb +0 -1
- data/tests/spec/output_spec.rb +4 -3
- data/tests/spec/psrp/fragment_spec.rb +0 -2
- data/tests/spec/psrp/message_data/base_spec.rb +0 -2
- data/tests/spec/psrp/message_data/error_record_spec.rb +0 -2
- data/tests/spec/psrp/message_data/pipeline_host_call_spec.rb +0 -2
- data/tests/spec/psrp/message_data/pipeline_output_spec.rb +0 -2
- data/tests/spec/psrp/message_data/pipeline_state_spec.rb +0 -2
- data/tests/spec/psrp/message_data/runspace_pool_host_call_spec.rb +0 -2
- data/tests/spec/psrp/message_data/runspacepool_state_spec.rb +0 -2
- data/tests/spec/psrp/message_data/session_capability_spec.rb +0 -2
- data/tests/spec/psrp/message_data_spec.rb +0 -2
- data/tests/spec/psrp/message_defragmenter_spec.rb +0 -2
- data/tests/spec/psrp/message_fragmenter_spec.rb +0 -2
- data/tests/spec/psrp/powershell_output_decoder_spec.rb +0 -2
- data/tests/spec/psrp/psrp_message_spec.rb +10 -7
- data/tests/spec/psrp/recieve_response_reader_spec.rb +0 -2
- data/tests/spec/psrp/uuid_spec.rb +2 -2
- data/tests/spec/response_handler_spec.rb +69 -61
- data/tests/spec/shells/base_spec.rb +7 -5
- data/tests/spec/shells/cmd_spec.rb +4 -4
- data/tests/spec/shells/powershell_spec.rb +221 -175
- data/tests/spec/spec_helper.rb +0 -1
- data/tests/spec/stubs/responses/get_omi_command_output_response.xml.erb +23 -0
- data/tests/spec/stubs/responses/get_omi_command_output_response_not_done.xml.erb +24 -0
- data/tests/spec/stubs/responses/get_omi_config_response.xml +45 -0
- data/tests/spec/stubs/responses/get_omi_powershell_keepalive_response.xml.erb +33 -0
- data/tests/spec/stubs/responses/open_shell_omi.xml +43 -0
- data/tests/spec/stubs/responses/soap_fault_omi.xml +31 -0
- data/tests/spec/wsmv/cleanup_command_spec.rb +0 -2
- data/tests/spec/wsmv/close_shell_spec.rb +0 -2
- data/tests/spec/wsmv/command_output_decoder_spec.rb +0 -2
- data/tests/spec/wsmv/command_output_spec.rb +1 -3
- data/tests/spec/wsmv/command_spec.rb +0 -2
- data/tests/spec/wsmv/configuration_spec.rb +0 -2
- data/tests/spec/wsmv/create_pipeline_spec.rb +2 -3
- data/tests/spec/wsmv/create_shell_spec.rb +6 -5
- data/tests/spec/wsmv/init_runspace_pool_spec.rb +38 -36
- data/tests/spec/wsmv/keep_alive_spec.rb +4 -4
- data/tests/spec/wsmv/receive_response_reader_spec.rb +124 -123
- data/tests/spec/wsmv/send_data_spec.rb +4 -4
- data/tests/spec/wsmv/wql_query_spec.rb +11 -13
- data/tests/spec/wsmv/write_stdin_spec.rb +0 -2
- data/winrm.gemspec +11 -12
- metadata +73 -67
@@ -1,175 +1,221 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
let(:
|
7
|
-
let(:
|
8
|
-
let(:
|
9
|
-
let(:
|
10
|
-
let(:
|
11
|
-
let(:
|
12
|
-
let(:
|
13
|
-
let(:
|
14
|
-
let(:
|
15
|
-
let(:
|
16
|
-
let(:
|
17
|
-
let(:
|
18
|
-
let(:
|
19
|
-
let(:
|
20
|
-
let(:
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
end
|
40
|
-
let(:
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
let(:message2)
|
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
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
it '
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
1
|
+
require 'winrm/shells/power_shell'
|
2
|
+
|
3
|
+
describe WinRM::Shells::Powershell do
|
4
|
+
let(:retry_limit) { 1 }
|
5
|
+
let(:max_envelope_size_kb) { 150 }
|
6
|
+
let(:shell_id) { 'bc1bfbba-8215-4a04-b2df-7a3ac0310e16' }
|
7
|
+
let(:output) { 'output' }
|
8
|
+
let(:command_id) { '4218A578-0F18-4B19-82C3-46B433319126' }
|
9
|
+
let(:keepalive_payload) { 'keepalive_payload' }
|
10
|
+
let(:configuration_payload) { 'configuration_payload' }
|
11
|
+
let(:command_payload) { 'command_payload' }
|
12
|
+
let(:create_shell_payload) { 'create_shell_payload' }
|
13
|
+
let(:close_shell_payload) { 'close_shell_payload' }
|
14
|
+
let(:cleanup_payload) { 'cleanup_payload' }
|
15
|
+
let(:command) { 'command' }
|
16
|
+
let(:output_message) { double('output_message', build: 'output_message') }
|
17
|
+
let(:connection_options) { { max_commands: 100, retry_limit: retry_limit, retry_delay: 0 } }
|
18
|
+
let(:transport) { double('transport', send_request: nil) }
|
19
|
+
let(:protocol_version) { 2.2 }
|
20
|
+
let(:test_data1) do
|
21
|
+
<<-EOH
|
22
|
+
<Obj RefId="0">
|
23
|
+
<MS>
|
24
|
+
<Version N="protocolversion">#{protocol_version}</Version>
|
25
|
+
<Version N="PSVersion">2.0</Version>
|
26
|
+
<Version N="SerializationVersion">1.1.0.1</Version>
|
27
|
+
</MS>
|
28
|
+
</Obj>
|
29
|
+
EOH
|
30
|
+
end
|
31
|
+
let(:test_data2) { '<Obj RefId="0"><MS><I32 N="RunspaceState">2</I32></MS></Obj>' }
|
32
|
+
let(:message1) do
|
33
|
+
WinRM::PSRP::Message.new(
|
34
|
+
shell_id,
|
35
|
+
WinRM::PSRP::Message::MESSAGE_TYPES[:session_capability],
|
36
|
+
test_data1,
|
37
|
+
command_id
|
38
|
+
)
|
39
|
+
end
|
40
|
+
let(:message2) do
|
41
|
+
WinRM::PSRP::Message.new(
|
42
|
+
shell_id,
|
43
|
+
WinRM::PSRP::Message::MESSAGE_TYPES[:runspacepool_state],
|
44
|
+
test_data2,
|
45
|
+
command_id
|
46
|
+
)
|
47
|
+
end
|
48
|
+
let(:fragment1) { WinRM::PSRP::Fragment.new(1, message1.bytes) }
|
49
|
+
let(:fragment2) { WinRM::PSRP::Fragment.new(1, message2.bytes) }
|
50
|
+
let(:test_data_stdout1) { Base64.strict_encode64(fragment1.bytes.pack('C*')) }
|
51
|
+
let(:test_data_stdout2) { Base64.strict_encode64(fragment2.bytes.pack('C*')) }
|
52
|
+
|
53
|
+
{
|
54
|
+
'powershell' => {
|
55
|
+
keepalive_template_path: 'get_powershell_keepalive_response.xml.erb',
|
56
|
+
config: "<a xmlns:cfg='f'><cfg:MaxEnvelopeSizekb>" \
|
57
|
+
'<%= max_envelope_size_kb %></cfg:MaxEnvelopeSizekb></a>',
|
58
|
+
command: "<a xmlns:rsp='foo'><rsp:CommandId><%= command_id %></rsp:CommandId></a>"
|
59
|
+
},
|
60
|
+
'omi' => {
|
61
|
+
keepalive_template_path: 'get_omi_powershell_keepalive_response.xml.erb',
|
62
|
+
config: File.read('tests/spec/stubs/responses/get_omi_config_response.xml'),
|
63
|
+
command: "<p:CommandResponse xmlns:p='foo'><p:CommandId>" \
|
64
|
+
'<%= command_id %></p:CommandId></p:CommandResponse>'
|
65
|
+
}
|
66
|
+
}.each_pair do |server_type, response|
|
67
|
+
context "with server type #{server_type}" do
|
68
|
+
let(:command_response) { ERB.new(response[:command]).result(binding) }
|
69
|
+
|
70
|
+
before do
|
71
|
+
config_response = ERB.new(response[:config]).result(binding)
|
72
|
+
test_data_xml_template = ERB.new(stubbed_response(response[:keepalive_template_path]))
|
73
|
+
|
74
|
+
allow(SecureRandom).to receive(:uuid).and_return(command_id)
|
75
|
+
allow(subject).to receive(:command_output_message)
|
76
|
+
.with(shell_id, command_id)
|
77
|
+
.and_return(output_message)
|
78
|
+
allow_any_instance_of(WinRM::WSMV::CreatePipeline).to receive(:build)
|
79
|
+
.and_return(command_payload)
|
80
|
+
allow_any_instance_of(WinRM::WSMV::CloseShell).to receive(:build)
|
81
|
+
.and_return(close_shell_payload)
|
82
|
+
allow_any_instance_of(WinRM::WSMV::InitRunspacePool).to receive(:build)
|
83
|
+
.and_return(create_shell_payload)
|
84
|
+
allow_any_instance_of(WinRM::WSMV::Configuration).to receive(:build)
|
85
|
+
.and_return(configuration_payload)
|
86
|
+
allow_any_instance_of(WinRM::WSMV::CleanupCommand).to receive(:build)
|
87
|
+
.and_return(cleanup_payload)
|
88
|
+
allow_any_instance_of(WinRM::WSMV::KeepAlive).to receive(:build)
|
89
|
+
.and_return(keepalive_payload)
|
90
|
+
allow_any_instance_of(WinRM::PSRP::ReceiveResponseReader).to receive(:read_output)
|
91
|
+
.with(output_message).and_return(output)
|
92
|
+
allow(transport).to receive(:send_request).with(configuration_payload) do |_|
|
93
|
+
# parse real XML with ResponseHandler to raise WinRMSoapFault
|
94
|
+
WinRM::ResponseHandler.new(config_response, 500).parse_to_xml if server_type == 'omi'
|
95
|
+
REXML::Document.new(config_response)
|
96
|
+
end
|
97
|
+
allow(transport).to receive(:send_request)
|
98
|
+
.with(create_shell_payload)
|
99
|
+
.and_return(REXML::Document.new("<blah Name='ShellId'>#{shell_id}</blah>"))
|
100
|
+
allow(transport).to receive(:send_request)
|
101
|
+
.with(command_payload)
|
102
|
+
.and_return(REXML::Document.new(command_response))
|
103
|
+
allow(transport).to receive(:send_request)
|
104
|
+
.with(keepalive_payload)
|
105
|
+
.and_return(REXML::Document.new(test_data_xml_template.result(binding)))
|
106
|
+
end
|
107
|
+
|
108
|
+
subject { described_class.new(connection_options, transport, Logging.logger['test']) }
|
109
|
+
|
110
|
+
describe '#run' do
|
111
|
+
it 'opens a shell and gets shell id' do
|
112
|
+
subject.run(command)
|
113
|
+
expect(subject.shell_id).to eq shell_id
|
114
|
+
end
|
115
|
+
|
116
|
+
it 'sends create shell through transport' do
|
117
|
+
expect(transport).to receive(:send_request).with(create_shell_payload)
|
118
|
+
subject.run(command)
|
119
|
+
end
|
120
|
+
|
121
|
+
it 'sends keepalive shell through transport' do
|
122
|
+
expect(transport).to receive(:send_request).with(keepalive_payload)
|
123
|
+
subject.run(command)
|
124
|
+
end
|
125
|
+
|
126
|
+
it 'returns output from generated command' do
|
127
|
+
expect(subject.run(command)).to eq output
|
128
|
+
end
|
129
|
+
|
130
|
+
it 'sends command through transport' do
|
131
|
+
expect(transport).to receive(:send_request).with(command_payload)
|
132
|
+
subject.run(command)
|
133
|
+
end
|
134
|
+
|
135
|
+
it 'sends cleanup message through transport' do
|
136
|
+
expect(transport).to receive(:send_request).with(cleanup_payload)
|
137
|
+
subject.run(command)
|
138
|
+
end
|
139
|
+
|
140
|
+
# OMI server doesn't respond to configuration so these tests are irrelevant there
|
141
|
+
context 'non admin user', if: server_type == 'powershell' do
|
142
|
+
before do
|
143
|
+
allow(transport).to receive(:send_request)
|
144
|
+
.with(configuration_payload)
|
145
|
+
.and_raise(WinRM::WinRMWSManFault.new('no access for you', '5'))
|
146
|
+
end
|
147
|
+
|
148
|
+
context 'protocol version 2.1' do
|
149
|
+
let(:protocol_version) { 2.1 }
|
150
|
+
let(:command) { 'c' * 200000 }
|
151
|
+
|
152
|
+
it 'sets the fragmenter max_blob_length' do
|
153
|
+
expect_any_instance_of(WinRM::PSRP::MessageFragmenter).to receive(:max_blob_length=)
|
154
|
+
.with(153600)
|
155
|
+
subject.run(command)
|
156
|
+
end
|
157
|
+
|
158
|
+
it 'fragments messages smaller than max envelope size' do
|
159
|
+
allow_any_instance_of(WinRM::WSMV::CreatePipeline).to receive(:build)
|
160
|
+
.and_call_original
|
161
|
+
allow(transport).to receive(:send_request).with(/CommandLine/) do |payload|
|
162
|
+
expect(payload.length).to eq 206512
|
163
|
+
end.and_return(REXML::Document.new(command_response))
|
164
|
+
subject.run(command)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
context 'protocol version 2.2' do
|
169
|
+
let(:protocol_version) { 2.2 }
|
170
|
+
let(:command) { 'c' * 200000 }
|
171
|
+
|
172
|
+
it 'sets the fragmenter max_blob_length' do
|
173
|
+
expect_any_instance_of(WinRM::PSRP::MessageFragmenter).to receive(:max_blob_length=)
|
174
|
+
.with(512000)
|
175
|
+
subject.run(command)
|
176
|
+
end
|
177
|
+
|
178
|
+
it 'fragments messages smaller than max envelope size' do
|
179
|
+
allow_any_instance_of(WinRM::WSMV::CreatePipeline).to receive(:build)
|
180
|
+
.and_call_original
|
181
|
+
allow(transport).to receive(:send_request).with(/CommandLine/) do |payload|
|
182
|
+
expect(payload.length).to eq 276028
|
183
|
+
end.and_return(REXML::Document.new(command_response))
|
184
|
+
subject.run(command)
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
context 'fragment large command' do
|
190
|
+
let(:command) { 'c' * 200000 }
|
191
|
+
|
192
|
+
it 'fragments messages as large as max envelope size' do
|
193
|
+
allow_any_instance_of(WinRM::WSMV::CreatePipeline).to receive(:build).and_call_original
|
194
|
+
allow(transport).to receive(:send_request).with(/CommandLine/) do |payload|
|
195
|
+
fallback = subject.max_fragment_blob_size ==
|
196
|
+
WinRM::PSRP::MessageFragmenter::DEFAULT_BLOB_LENGTH
|
197
|
+
# OMI server uses default blob size b/c config endpoint unavailable
|
198
|
+
expect(payload.length).to eq fallback ? 45404 : max_envelope_size_kb * 1024
|
199
|
+
end.and_return(REXML::Document.new(command_response))
|
200
|
+
subject.run(command)
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
describe '#close' do
|
206
|
+
it 'sends close shell through transport' do
|
207
|
+
subject.run(command)
|
208
|
+
expect(transport).to receive(:send_request).with(close_shell_payload)
|
209
|
+
subject.close
|
210
|
+
end
|
211
|
+
|
212
|
+
it 'creates a shell closer with powershell uri' do
|
213
|
+
allow(WinRM::WSMV::CloseShell).to receive(:new) do |_, opts|
|
214
|
+
expect(opts[:shell_uri]).to be WinRM::WSMV::Header::RESOURCE_URI_POWERSHELL
|
215
|
+
end.and_call_original
|
216
|
+
subject.close
|
217
|
+
end
|
218
|
+
end
|
219
|
+
end
|
220
|
+
end
|
221
|
+
end
|
data/tests/spec/spec_helper.rb
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://www.w3.org/2003/05/soap-envelope'
|
2
|
+
xmlns:wsa='http://schemas.xmlsoap.org/ws/2004/08/addressing'
|
3
|
+
xmlns:wsen='http://schemas.xmlsoap.org/ws/2004/09/enumeration'
|
4
|
+
xmlns:e='http://schemas.xmlsoap.org/ws/2004/08/eventing'
|
5
|
+
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
|
6
|
+
xmlns:wsmb='http://schemas.dmtf.org/wbem/wsman/1/cimbinding.xsd'
|
7
|
+
xmlns:wsman='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd'
|
8
|
+
xmlns:wxf='http://schemas.xmlsoap.org/ws/2004/09/transfer'
|
9
|
+
xmlns:cim='http://schemas.dmtf.org/wbem/wscim/1/common'
|
10
|
+
xmlns:msftwinrm='http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd'
|
11
|
+
xmlns:wsmid='http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd'>
|
12
|
+
<SOAP-ENV:Header>
|
13
|
+
<wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
|
14
|
+
<wsa:Action>http://schemas.microsoft.com/wbem/wsman/1/windows/shell/ReceiveResponse</wsa:Action>
|
15
|
+
<wsa:MessageID>uuid:5825BEA8-76AB-0005-0000-000000640000</wsa:MessageID>
|
16
|
+
<wsa:RelatesTo>uuid:E22E9766-0817-4056-99F8-EB5997BC2138</wsa:RelatesTo>
|
17
|
+
</SOAP-ENV:Header>
|
18
|
+
<SOAP-ENV:Body>
|
19
|
+
<p:ReceiveResponse xmlns:p='http://schemas.microsoft.com/wbem/wsman/1/windows/shell'>
|
20
|
+
<p:CommandState State='http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandState/Done'/>
|
21
|
+
</p:ReceiveResponse>
|
22
|
+
</SOAP-ENV:Body>
|
23
|
+
</SOAP-ENV:Envelope>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://www.w3.org/2003/05/soap-envelope'
|
2
|
+
xmlns:wsa='http://schemas.xmlsoap.org/ws/2004/08/addressing'
|
3
|
+
xmlns:wsen='http://schemas.xmlsoap.org/ws/2004/09/enumeration'
|
4
|
+
xmlns:e='http://schemas.xmlsoap.org/ws/2004/08/eventing'
|
5
|
+
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
|
6
|
+
xmlns:wsmb='http://schemas.dmtf.org/wbem/wsman/1/cimbinding.xsd'
|
7
|
+
xmlns:wsman='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd'
|
8
|
+
xmlns:wxf='http://schemas.xmlsoap.org/ws/2004/09/transfer'
|
9
|
+
xmlns:cim='http://schemas.dmtf.org/wbem/wscim/1/common'
|
10
|
+
xmlns:msftwinrm='http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd'
|
11
|
+
xmlns:wsmid='http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd'>
|
12
|
+
<SOAP-ENV:Header>
|
13
|
+
<wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
|
14
|
+
<wsa:Action>http://schemas.microsoft.com/wbem/wsman/1/windows/shell/ReceiveResponse</wsa:Action>
|
15
|
+
<wsa:MessageID>uuid:5825BEA8-76AB-0005-0000-000000640000</wsa:MessageID>
|
16
|
+
<wsa:RelatesTo>uuid:E22E9766-0817-4056-99F8-EB5997BC2138</wsa:RelatesTo>
|
17
|
+
</SOAP-ENV:Header>
|
18
|
+
<SOAP-ENV:Body>
|
19
|
+
<p:ReceiveResponse xmlns:p='http://schemas.microsoft.com/wbem/wsman/1/windows/shell'>
|
20
|
+
<p:Stream Name='stdout'><%= test_data_stdout %></p:Stream>
|
21
|
+
<p:CommandState State='http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandState/Running'/>
|
22
|
+
</p:ReceiveResponse>
|
23
|
+
</SOAP-ENV:Body>
|
24
|
+
</SOAP-ENV:Envelope>
|