winrm 1.8.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +10 -11
  3. data/.rubocop.yml +26 -22
  4. data/.travis.yml +11 -12
  5. data/Gemfile +3 -9
  6. data/LICENSE +202 -202
  7. data/README.md +232 -215
  8. data/Rakefile +34 -36
  9. data/Vagrantfile +6 -9
  10. data/WinrmAppveyor.psm1 +31 -31
  11. data/appveyor.yml +51 -51
  12. data/bin/rwinrm +97 -97
  13. data/changelog.md +86 -86
  14. data/lib/winrm.rb +39 -42
  15. data/lib/winrm/connection.rb +82 -0
  16. data/lib/winrm/connection_opts.rb +87 -0
  17. data/lib/winrm/{exceptions/exceptions.rb → exceptions.rb} +76 -57
  18. data/lib/winrm/http/response_handler.rb +96 -82
  19. data/lib/winrm/http/transport.rb +424 -435
  20. data/lib/winrm/http/transport_factory.rb +68 -0
  21. data/lib/winrm/output.rb +59 -43
  22. data/lib/winrm/psrp/create_pipeline.xml.erb +167 -0
  23. data/lib/winrm/psrp/fragment.rb +70 -0
  24. data/lib/winrm/psrp/init_runspace_pool.xml.erb +224 -0
  25. data/lib/winrm/psrp/message.rb +130 -0
  26. data/lib/winrm/psrp/message_data.rb +41 -0
  27. data/lib/winrm/psrp/message_data/base.rb +49 -0
  28. data/lib/winrm/psrp/message_data/error_record.rb +68 -0
  29. data/lib/winrm/psrp/message_data/pipeline_host_call.rb +32 -0
  30. data/lib/winrm/psrp/message_data/pipeline_output.rb +49 -0
  31. data/lib/winrm/psrp/message_data/runspacepool_host_call.rb +32 -0
  32. data/lib/winrm/psrp/message_data/runspacepool_state.rb +39 -0
  33. data/lib/winrm/psrp/message_data/session_capability.rb +36 -0
  34. data/lib/winrm/psrp/message_defragmenter.rb +62 -0
  35. data/lib/winrm/psrp/message_factory.rb +75 -0
  36. data/lib/winrm/psrp/message_fragmenter.rb +60 -0
  37. data/lib/winrm/psrp/powershell_output_decoder.rb +120 -0
  38. data/lib/winrm/psrp/receive_response_reader.rb +93 -0
  39. data/lib/winrm/psrp/session_capability.xml.erb +7 -0
  40. data/lib/winrm/psrp/uuid.rb +40 -0
  41. data/lib/winrm/shells/base.rb +175 -0
  42. data/lib/winrm/shells/cmd.rb +65 -0
  43. data/lib/winrm/shells/power_shell.rb +201 -0
  44. data/lib/winrm/shells/retryable.rb +45 -0
  45. data/lib/winrm/shells/shell_factory.rb +50 -0
  46. data/lib/winrm/version.rb +7 -7
  47. data/lib/winrm/wsmv/base.rb +59 -0
  48. data/lib/winrm/wsmv/cleanup_command.rb +61 -0
  49. data/lib/winrm/wsmv/close_shell.rb +50 -0
  50. data/lib/winrm/wsmv/command.rb +101 -0
  51. data/lib/winrm/wsmv/command_output.rb +76 -0
  52. data/lib/winrm/wsmv/command_output_decoder.rb +55 -0
  53. data/lib/winrm/wsmv/configuration.rb +46 -0
  54. data/lib/winrm/wsmv/create_pipeline.rb +66 -0
  55. data/lib/winrm/wsmv/create_shell.rb +119 -0
  56. data/lib/winrm/wsmv/header.rb +203 -0
  57. data/lib/winrm/wsmv/init_runspace_pool.rb +95 -0
  58. data/lib/winrm/wsmv/iso8601_duration.rb +60 -0
  59. data/lib/winrm/wsmv/keep_alive.rb +68 -0
  60. data/lib/winrm/wsmv/receive_response_reader.rb +128 -0
  61. data/lib/winrm/wsmv/send_data.rb +68 -0
  62. data/lib/winrm/wsmv/soap.rb +51 -0
  63. data/lib/winrm/wsmv/wql_query.rb +79 -0
  64. data/lib/winrm/wsmv/write_stdin.rb +88 -0
  65. data/preamble +17 -17
  66. data/{spec → tests/integration}/auth_timeout_spec.rb +18 -16
  67. data/{spec → tests/integration}/cmd_spec.rb +104 -102
  68. data/{spec → tests/integration}/config-example.yml +16 -19
  69. data/{spec → tests/integration}/issue_59_spec.rb +26 -23
  70. data/tests/integration/powershell_spec.rb +154 -0
  71. data/{spec → tests/integration}/spec_helper.rb +65 -73
  72. data/{spec → tests/integration}/transport_spec.rb +99 -139
  73. data/{spec → tests/integration}/wql_spec.rb +16 -14
  74. data/{spec → tests}/matchers.rb +60 -74
  75. data/tests/spec/configuration_spec.rb +93 -0
  76. data/tests/spec/connection_spec.rb +39 -0
  77. data/{spec → tests/spec}/exception_spec.rb +50 -50
  78. data/tests/spec/http/transport_factory_spec.rb +68 -0
  79. data/tests/spec/http/transport_spec.rb +44 -0
  80. data/{spec → tests/spec}/output_spec.rb +127 -110
  81. data/tests/spec/psrp/fragment_spec.rb +62 -0
  82. data/tests/spec/psrp/message_data/base_spec.rb +13 -0
  83. data/tests/spec/psrp/message_data/error_record_spec.rb +41 -0
  84. data/tests/spec/psrp/message_data/pipeline_host_call_spec.rb +25 -0
  85. data/tests/spec/psrp/message_data/pipeline_output_spec.rb +32 -0
  86. data/tests/spec/psrp/message_data/runspace_pool_host_call_spec.rb +25 -0
  87. data/tests/spec/psrp/message_data/runspacepool_state_spec.rb +16 -0
  88. data/tests/spec/psrp/message_data/session_capability_spec.rb +30 -0
  89. data/tests/spec/psrp/message_data_spec.rb +35 -0
  90. data/tests/spec/psrp/message_defragmenter_spec.rb +47 -0
  91. data/tests/spec/psrp/message_fragmenter_spec.rb +105 -0
  92. data/tests/spec/psrp/powershell_output_decoder_spec.rb +84 -0
  93. data/tests/spec/psrp/psrp_message_spec.rb +70 -0
  94. data/tests/spec/psrp/recieve_response_reader_spec.rb +154 -0
  95. data/tests/spec/psrp/uuid_spec.rb +28 -0
  96. data/{spec → tests/spec}/response_handler_spec.rb +61 -61
  97. data/tests/spec/shells/base_spec.rb +202 -0
  98. data/tests/spec/shells/cmd_spec.rb +75 -0
  99. data/tests/spec/shells/powershell_spec.rb +175 -0
  100. data/tests/spec/spec_helper.rb +47 -0
  101. data/tests/spec/stubs/clixml/error_record.xml.erb +84 -0
  102. data/{spec → tests/spec}/stubs/responses/get_command_output_response.xml.erb +13 -13
  103. data/tests/spec/stubs/responses/get_command_output_response_not_done.xml.erb +10 -0
  104. data/tests/spec/stubs/responses/get_powershell_keepalive_response.xml.erb +10 -0
  105. data/tests/spec/stubs/responses/get_powershell_output_response.xml.erb +12 -0
  106. data/tests/spec/stubs/responses/get_powershell_output_response_not_done.xml.erb +9 -0
  107. data/{spec → tests/spec}/stubs/responses/open_shell_v1.xml +19 -19
  108. data/{spec → tests/spec}/stubs/responses/open_shell_v2.xml +20 -20
  109. data/{spec → tests/spec}/stubs/responses/soap_fault_v1.xml +36 -36
  110. data/{spec → tests/spec}/stubs/responses/soap_fault_v2.xml +42 -42
  111. data/{spec → tests/spec}/stubs/responses/wmi_error_v2.xml +41 -41
  112. data/tests/spec/wsmv/cleanup_command_spec.rb +22 -0
  113. data/tests/spec/wsmv/close_shell_spec.rb +17 -0
  114. data/{spec → tests/spec/wsmv}/command_output_decoder_spec.rb +37 -37
  115. data/tests/spec/wsmv/command_output_spec.rb +45 -0
  116. data/tests/spec/wsmv/command_spec.rb +19 -0
  117. data/tests/spec/wsmv/configuration_spec.rb +17 -0
  118. data/tests/spec/wsmv/create_pipeline_spec.rb +31 -0
  119. data/tests/spec/wsmv/create_shell_spec.rb +38 -0
  120. data/tests/spec/wsmv/init_runspace_pool_spec.rb +36 -0
  121. data/tests/spec/wsmv/keep_alive_spec.rb +21 -0
  122. data/tests/spec/wsmv/receive_response_reader_spec.rb +123 -0
  123. data/tests/spec/wsmv/send_data_spec.rb +30 -0
  124. data/tests/spec/wsmv/wql_query_spec.rb +13 -0
  125. data/tests/spec/wsmv/write_stdin_spec.rb +22 -0
  126. data/winrm.gemspec +42 -40
  127. metadata +140 -38
  128. data/.rspec +0 -3
  129. data/lib/winrm/command_executor.rb +0 -243
  130. data/lib/winrm/command_output_decoder.rb +0 -53
  131. data/lib/winrm/helpers/iso8601_duration.rb +0 -58
  132. data/lib/winrm/helpers/powershell_script.rb +0 -42
  133. data/lib/winrm/soap_provider.rb +0 -39
  134. data/lib/winrm/winrm_service.rb +0 -550
  135. data/spec/command_executor_spec.rb +0 -475
  136. data/spec/issue_184_spec.rb +0 -67
  137. data/spec/powershell_spec.rb +0 -97
  138. data/spec/winrm_options_spec.rb +0 -76
  139. data/spec/winrm_primitives_spec.rb +0 -51
@@ -0,0 +1,47 @@
1
+ # encoding: UTF-8
2
+ require 'rubygems'
3
+ require 'bundler/setup'
4
+ require 'winrm'
5
+ require 'json'
6
+ require_relative '../matchers'
7
+
8
+ # Unit test spec helper
9
+ module SpecUnitHelper
10
+ def stubbed_response(file)
11
+ File.read("tests/spec/stubs/responses/#{file}")
12
+ end
13
+
14
+ def stubbed_clixml(file)
15
+ File.read("tests/spec/stubs/clixml/#{file}")
16
+ end
17
+
18
+ def default_connection_opts
19
+ {
20
+ user: 'Administrator',
21
+ password: 'password',
22
+ endpoint: 'http://localhost:5985/wsman',
23
+ max_envelope_size: 153600,
24
+ session_id: '05A2622B-B842-4EB8-8A78-0225C8A993DF',
25
+ operation_timeout: 60,
26
+ locale: 'en-US'
27
+ }
28
+ end
29
+ end
30
+
31
+ # Strip leading whitespace from each line that is the same as the
32
+ # amount of whitespace on the first line of the string.
33
+ # Leaves _additional_ indentation on later lines intact.
34
+ # and remove newlines.
35
+ class String
36
+ def unindent
37
+ gsub(/^#{self[/\A[ \t]*/]}/, '').delete("\n")
38
+ end
39
+
40
+ def to_byte_string
41
+ force_encoding(Encoding::ASCII_8BIT)
42
+ end
43
+ end
44
+
45
+ RSpec.configure do |config|
46
+ config.include(SpecUnitHelper)
47
+ end
@@ -0,0 +1,84 @@
1
+ <?xml version="1.0"?>
2
+ <Obj RefId="0">
3
+ <TN RefId="0">
4
+ <T>System.Management.Automation.ErrorRecord</T>
5
+ <T>System.Object</T>
6
+ </TN>
7
+ <ToString><%= error_message %></ToString>
8
+ <MS>
9
+ <B N="writeErrorStream">true</B>
10
+ <Obj N="Exception" RefId="1">
11
+ <TN RefId="1">
12
+ <T>Microsoft.PowerShell.Commands.WriteErrorException</T>
13
+ <T>Microsoft.PowerShell.CoreClr.Stubs.SystemException</T>
14
+ <T>System.Exception</T>
15
+ <T>System.Object</T>
16
+ </TN>
17
+ <ToString>Microsoft.PowerShell.Commands.WriteErrorException: <%= error_message %></ToString>
18
+ <Props>
19
+ <S N="Message"><%= error_message %></S>
20
+ <Obj N="Data" RefId="2">
21
+ <TN RefId="2">
22
+ <T>System.Collections.ListDictionaryInternal</T>
23
+ <T>System.Object</T>
24
+ </TN>
25
+ <DCT/>
26
+ </Obj>
27
+ <Nil N="InnerException"/>
28
+ <Nil N="StackTrace"/>
29
+ <Nil N="HelpLink"/>
30
+ <Nil N="Source"/>
31
+ <I32 N="HResult">-2146233088</I32>
32
+ </Props>
33
+ </Obj>
34
+ <Nil N="TargetObject"/>
35
+ <S N="FullyQualifiedErrorId"><%= error_id %></S>
36
+ <Obj N="InvocationInfo" RefId="3">
37
+ <TN RefId="3">
38
+ <T>System.Management.Automation.InvocationInfo</T>
39
+ <T>System.Object</T>
40
+ </TN>
41
+ <ToString>System.Management.Automation.InvocationInfo</ToString>
42
+ <Props>
43
+ <Nil N="MyCommand"/>
44
+ <Obj N="BoundParameters" RefId="4">
45
+ <TN RefId="4">
46
+ <T>System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]</T>
47
+ <T>System.Object</T>
48
+ </TN>
49
+ <DCT/>
50
+ </Obj>
51
+ <Obj N="UnboundArguments" RefId="5">
52
+ <TN RefId="5">
53
+ <T>System.Collections.Generic.List`1[[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]</T>
54
+ <T>System.Object</T>
55
+ </TN>
56
+ <LST/>
57
+ </Obj>
58
+ <I32 N="ScriptLineNumber">1</I32>
59
+ <I32 N="OffsetInLine">1</I32>
60
+ <I64 N="HistoryId">1</I64>
61
+ <S N="ScriptName"/>
62
+ <S N="Line">write-error '<%= error_message %>'</S>
63
+ <S N="PositionMessage">At line:1 char:1_x000D__x000A_+ write-error '<%= error_message %>'_x000D__x000A_+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</S>
64
+ <S N="PSScriptRoot"><%= script_root %></S>
65
+ <Nil N="PSCommandPath"/>
66
+ <S N="InvocationName"/>
67
+ <I32 N="PipelineLength">0</I32>
68
+ <I32 N="PipelinePosition">0</I32>
69
+ <B N="ExpectingInput">false</B>
70
+ <S N="CommandOrigin">Internal</S>
71
+ <Nil N="DisplayScriptPosition"/>
72
+ </Props>
73
+ </Obj>
74
+ <I32 N="ErrorCategory_Category">0</I32>
75
+ <S N="ErrorCategory_Activity">Write-Error</S>
76
+ <S N="ErrorCategory_Reason">WriteErrorException</S>
77
+ <S N="ErrorCategory_TargetName"/>
78
+ <S N="ErrorCategory_TargetType"/>
79
+ <S N="ErrorCategory_Message"><%= category_message %></S>
80
+ <B N="SerializeExtendedInfo">false</B>
81
+ <S N="ErrorDetails_ScriptStackTrace"><%= stack_trace %></S>
82
+ <Nil N="PSMessageDetails"/>
83
+ </MS>
84
+ </Obj>
@@ -1,13 +1,13 @@
1
- <s:Envelope xmlns:a='http://schemas.xmlsoap.org/ws/2004/08/addressing' xml:lang='en-US' xmlns:p='http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd' xmlns:rsp='http://schemas.microsoft.com/wbem/wsman/1/windows/shell' xmlns:s='http://www.w3.org/2003/05/soap-envelope' xmlns:w='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd'>
2
- <s:Header>
3
- </s:Header>
4
- <s:Body>
5
- <rsp:ReceiveResponse>
6
- <rsp:Stream CommandId='<%= command_id %>' Name='stdout'><%= test_data_stdout %></rsp:Stream>
7
- <rsp:Stream CommandId='<%= command_id %>' End='true' Name='stderr'><%= test_data_stderr %></rsp:Stream>
8
- <rsp:CommandState CommandId='<%= command_id %>' State='http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandState/Done'>
9
- <rsp:ExitCode>0</rsp:ExitCode>
10
- </rsp:CommandState>
11
- </rsp:ReceiveResponse>
12
- </s:Body>
13
- </s:Envelope>
1
+ <s:Envelope xmlns:a='http://schemas.xmlsoap.org/ws/2004/08/addressing' xml:lang='en-US' xmlns:p='http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd' xmlns:rsp='http://schemas.microsoft.com/wbem/wsman/1/windows/shell' xmlns:s='http://www.w3.org/2003/05/soap-envelope' xmlns:w='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd'>
2
+ <s:Header>
3
+ </s:Header>
4
+ <s:Body>
5
+ <rsp:ReceiveResponse>
6
+ <rsp:Stream CommandId='<%= command_id %>' Name='stdout'><%= test_data_stdout %></rsp:Stream>
7
+ <rsp:Stream CommandId='<%= command_id %>' End='true' Name='stderr'><%= test_data_stderr %></rsp:Stream>
8
+ <rsp:CommandState CommandId='<%= command_id %>' State='http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandState/Done'>
9
+ <rsp:ExitCode>0</rsp:ExitCode>
10
+ </rsp:CommandState>
11
+ </rsp:ReceiveResponse>
12
+ </s:Body>
13
+ </s:Envelope>
@@ -0,0 +1,10 @@
1
+ <s:Envelope xmlns:a='http://schemas.xmlsoap.org/ws/2004/08/addressing' xml:lang='en-US' xmlns:p='http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd' xmlns:rsp='http://schemas.microsoft.com/wbem/wsman/1/windows/shell' xmlns:s='http://www.w3.org/2003/05/soap-envelope' xmlns:w='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd'>
2
+ <s:Header>
3
+ </s:Header>
4
+ <s:Body>
5
+ <rsp:ReceiveResponse>
6
+ <rsp:Stream CommandId='<%= command_id %>' Name='stdout'><%= test_data_stdout %></rsp:Stream>
7
+ <rsp:Stream CommandId='<%= command_id %>' End='true' Name='stderr'><%= test_data_stderr %></rsp:Stream>
8
+ </rsp:ReceiveResponse>
9
+ </s:Body>
10
+ </s:Envelope>
@@ -0,0 +1,10 @@
1
+ <s:Envelope xmlns:a='http://schemas.xmlsoap.org/ws/2004/08/addressing' xml:lang='en-US' xmlns:p='http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd' xmlns:rsp='http://schemas.microsoft.com/wbem/wsman/1/windows/shell' xmlns:s='http://www.w3.org/2003/05/soap-envelope' xmlns:w='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd'>
2
+ <s:Header>
3
+ </s:Header>
4
+ <s:Body>
5
+ <rsp:ReceiveResponse>
6
+ <rsp:Stream Name='stdout'><%= test_data_stdout1 %></rsp:Stream>
7
+ <rsp:Stream Name='stdout'><%= test_data_stdout2 %></rsp:Stream>
8
+ </rsp:ReceiveResponse>
9
+ </s:Body>
10
+ </s:Envelope>
@@ -0,0 +1,12 @@
1
+ <s:Envelope xmlns:a='http://schemas.xmlsoap.org/ws/2004/08/addressing' xml:lang='en-US' xmlns:p='http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd' xmlns:rsp='http://schemas.microsoft.com/wbem/wsman/1/windows/shell' xmlns:s='http://www.w3.org/2003/05/soap-envelope' xmlns:w='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd'>
2
+ <s:Header>
3
+ </s:Header>
4
+ <s:Body>
5
+ <rsp:ReceiveResponse>
6
+ <rsp:Stream CommandId='<%= command_id %>' Name='stdout'><%= test_data_stdout %></rsp:Stream>
7
+ <rsp:CommandState CommandId='<%= command_id %>' State='http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandState/Done'>
8
+ <rsp:ExitCode>0</rsp:ExitCode>
9
+ </rsp:CommandState>
10
+ </rsp:ReceiveResponse>
11
+ </s:Body>
12
+ </s:Envelope>
@@ -0,0 +1,9 @@
1
+ <s:Envelope xmlns:a='http://schemas.xmlsoap.org/ws/2004/08/addressing' xml:lang='en-US' xmlns:p='http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd' xmlns:rsp='http://schemas.microsoft.com/wbem/wsman/1/windows/shell' xmlns:s='http://www.w3.org/2003/05/soap-envelope' xmlns:w='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd'>
2
+ <s:Header>
3
+ </s:Header>
4
+ <s:Body>
5
+ <rsp:ReceiveResponse>
6
+ <rsp:Stream CommandId='<%= command_id %>' Name='stdout'><%= test_data_stdout %></rsp:Stream>
7
+ </rsp:ReceiveResponse>
8
+ </s:Body>
9
+ </s:Envelope>
@@ -1,19 +1,19 @@
1
- <s:Envelope xml:lang='en-US' xmlns:s='http://www.w3.org/2003/05/soap-envelope' xmlns:a='http://schemas.xmlsoap.org/ws/2004/08/addressing' xmlns:w='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd'>
2
- <s:Header>
3
- <a:Action>http://schemas.xmlsoap.org/ws/2004/09/transfer/CreateResponse</a:Action>
4
- <a:MessageID>uuid:94D35B73-3DD8-428D-9495-7AF3F0559428</a:MessageID>
5
- <a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To>
6
- <a:RelatesTo>uuid:EEF803CE-B9A6-48C1-BF00-90C6F077EC2A</a:RelatesTo>
7
- </s:Header>
8
- <s:Body>
9
- <x:ResourceCreated xmlns:w='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd' xmlns:a='http://schemas.xmlsoap.org/ws/2004/08/addressing' xmlns:x='http://schemas.xmlsoap.org/ws/2004/09/transfer' xmlns:rsp='http://schemas.microsoft.com/wbem/wsman/1/windows/shell'>
10
- <a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
11
- <a:ReferenceParameters>
12
- <w:ResourceURI>http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd</w:ResourceURI>
13
- <w:SelectorSet>
14
- <w:Selector Name='ShellId'>uuid:739990FF-1492-4CDD-80BB-6E07ADB06D85</w:Selector>
15
- </w:SelectorSet>
16
- </a:ReferenceParameters>
17
- </x:ResourceCreated>
18
- </s:Body>
19
- </s:Envelope>
1
+ <s:Envelope xml:lang='en-US' xmlns:s='http://www.w3.org/2003/05/soap-envelope' xmlns:a='http://schemas.xmlsoap.org/ws/2004/08/addressing' xmlns:w='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd'>
2
+ <s:Header>
3
+ <a:Action>http://schemas.xmlsoap.org/ws/2004/09/transfer/CreateResponse</a:Action>
4
+ <a:MessageID>uuid:94D35B73-3DD8-428D-9495-7AF3F0559428</a:MessageID>
5
+ <a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To>
6
+ <a:RelatesTo>uuid:EEF803CE-B9A6-48C1-BF00-90C6F077EC2A</a:RelatesTo>
7
+ </s:Header>
8
+ <s:Body>
9
+ <x:ResourceCreated xmlns:w='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd' xmlns:a='http://schemas.xmlsoap.org/ws/2004/08/addressing' xmlns:x='http://schemas.xmlsoap.org/ws/2004/09/transfer' xmlns:rsp='http://schemas.microsoft.com/wbem/wsman/1/windows/shell'>
10
+ <a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
11
+ <a:ReferenceParameters>
12
+ <w:ResourceURI>http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd</w:ResourceURI>
13
+ <w:SelectorSet>
14
+ <w:Selector Name='ShellId'>uuid:739990FF-1492-4CDD-80BB-6E07ADB06D85</w:Selector>
15
+ </w:SelectorSet>
16
+ </a:ReferenceParameters>
17
+ </x:ResourceCreated>
18
+ </s:Body>
19
+ </s:Envelope>
@@ -1,20 +1,20 @@
1
- <?xml version="1.0"?>
2
- <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:x="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:rsp="http://schemas.microsoft.com/wbem/wsman/1/windows/shell" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd" xml:lang="en-US">
3
- <s:Header>
4
- <a:Action>http://schemas.xmlsoap.org/ws/2004/09/transfer/CreateResponse</a:Action>
5
- <a:MessageID>uuid:9FF5B7FE-CC97-4FA4-B51F-E4220C016AE7</a:MessageID>
6
- <a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To>
7
- <a:RelatesTo>uuid:EA2A7785-D8E6-4E28-8AD8-FC27156537B3</a:RelatesTo>
8
- </s:Header>
9
- <s:Body>
10
- <x:ResourceCreated>
11
- <a:Address>http://localhost:5985/wsman</a:Address>
12
- <a:ReferenceParameters>
13
- <w:ResourceURI>http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd</w:ResourceURI>
14
- <w:SelectorSet>
15
- <w:Selector Name="ShellId">62DE33F0-8674-43D9-B6A5-3298012CC4CD</w:Selector>
16
- </w:SelectorSet>
17
- </a:ReferenceParameters>
18
- </x:ResourceCreated>
19
- </s:Body>
20
- </s:Envelope>
1
+ <?xml version="1.0"?>
2
+ <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:x="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:rsp="http://schemas.microsoft.com/wbem/wsman/1/windows/shell" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd" xml:lang="en-US">
3
+ <s:Header>
4
+ <a:Action>http://schemas.xmlsoap.org/ws/2004/09/transfer/CreateResponse</a:Action>
5
+ <a:MessageID>uuid:9FF5B7FE-CC97-4FA4-B51F-E4220C016AE7</a:MessageID>
6
+ <a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To>
7
+ <a:RelatesTo>uuid:EA2A7785-D8E6-4E28-8AD8-FC27156537B3</a:RelatesTo>
8
+ </s:Header>
9
+ <s:Body>
10
+ <x:ResourceCreated>
11
+ <a:Address>http://localhost:5985/wsman</a:Address>
12
+ <a:ReferenceParameters>
13
+ <w:ResourceURI>http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd</w:ResourceURI>
14
+ <w:SelectorSet>
15
+ <w:Selector Name="ShellId">62DE33F0-8674-43D9-B6A5-3298012CC4CD</w:Selector>
16
+ </w:SelectorSet>
17
+ </a:ReferenceParameters>
18
+ </x:ResourceCreated>
19
+ </s:Body>
20
+ </s:Envelope>
@@ -1,36 +1,36 @@
1
- <s:Envelope xml:lang='en-US' xmlns:s='http://www.w3.org/2003/05/soap-envelope' xmlns:a='http://schemas.xmlsoap.org/ws/2004/08/addressing' xmlns:x='http://schemas.xmlsoap.org/ws/2004/09/transfer' xmlns:e='http://schemas.xmlsoap.org/ws/2004/08/eventing' xmlns:n='http://schemas.xmlsoap.org/ws/2004/09/enumeration' xmlns:w='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd'>
2
- <s:Header>
3
- <a:Action>http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault</a:Action>
4
- <a:MessageID>uuid:AF8907B2-F47E-4DE5-A4AA-E1EC36EA0E49</a:MessageID>
5
- <a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To>
6
- <a:RelatesTo>uuid:B90EC4BB-4484-4ADA-920B-019517747915</a:RelatesTo>
7
- </s:Header>
8
- <s:Body>
9
- <s:Fault>
10
- <s:Code>
11
- <s:Value>s:Sender</s:Value>
12
- <s:Subcode>
13
- <s:Value>n:CannotProcessFilter</s:Value>
14
- </s:Subcode>
15
- </s:Code>
16
- <s:Reason>
17
- <s:Text xml:lang='en-US'>
18
- The data source could not process the filter. The filter might be
19
- missing or it might be invalid. Change the filter and try the request
20
- again.
21
- </s:Text>
22
- </s:Reason>
23
- <s:Detail>
24
- <f:WSManFault xmlns:f='http://schemas.microsoft.com/wbem/wsman/1/wsmanfault' Code='2150858778' Machine=''>
25
- <f:Message>
26
- <f:ProviderFault provider='WMIv1 plugin for Windows Remote Management ' path='%systemroot%\system32\WsmWmiPl.dll'>
27
- <f:WSManFault xmlns:f='http://schemas.microsoft.com/wbem/wsman/1/wsmanfault' Code='2150858778' Machine='' xml:lang='en-US'>
28
- <f:Message>The specified class does not exist in the given namespace. </f:Message>
29
- </f:WSManFault>
30
- </f:ProviderFault>
31
- </f:Message>
32
- </f:WSManFault>
33
- </s:Detail>
34
- </s:Fault>
35
- </s:Body>
36
- </s:Envelope>
1
+ <s:Envelope xml:lang='en-US' xmlns:s='http://www.w3.org/2003/05/soap-envelope' xmlns:a='http://schemas.xmlsoap.org/ws/2004/08/addressing' xmlns:x='http://schemas.xmlsoap.org/ws/2004/09/transfer' xmlns:e='http://schemas.xmlsoap.org/ws/2004/08/eventing' xmlns:n='http://schemas.xmlsoap.org/ws/2004/09/enumeration' xmlns:w='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd'>
2
+ <s:Header>
3
+ <a:Action>http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault</a:Action>
4
+ <a:MessageID>uuid:AF8907B2-F47E-4DE5-A4AA-E1EC36EA0E49</a:MessageID>
5
+ <a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To>
6
+ <a:RelatesTo>uuid:B90EC4BB-4484-4ADA-920B-019517747915</a:RelatesTo>
7
+ </s:Header>
8
+ <s:Body>
9
+ <s:Fault>
10
+ <s:Code>
11
+ <s:Value>s:Sender</s:Value>
12
+ <s:Subcode>
13
+ <s:Value>n:CannotProcessFilter</s:Value>
14
+ </s:Subcode>
15
+ </s:Code>
16
+ <s:Reason>
17
+ <s:Text xml:lang='en-US'>
18
+ The data source could not process the filter. The filter might be
19
+ missing or it might be invalid. Change the filter and try the request
20
+ again.
21
+ </s:Text>
22
+ </s:Reason>
23
+ <s:Detail>
24
+ <f:WSManFault xmlns:f='http://schemas.microsoft.com/wbem/wsman/1/wsmanfault' Code='2150858778' Machine=''>
25
+ <f:Message>
26
+ <f:ProviderFault provider='WMIv1 plugin for Windows Remote Management ' path='%systemroot%\system32\WsmWmiPl.dll'>
27
+ <f:WSManFault xmlns:f='http://schemas.microsoft.com/wbem/wsman/1/wsmanfault' Code='2150858778' Machine='' xml:lang='en-US'>
28
+ <f:Message>The specified class does not exist in the given namespace. </f:Message>
29
+ </f:WSManFault>
30
+ </f:ProviderFault>
31
+ </f:Message>
32
+ </f:WSManFault>
33
+ </s:Detail>
34
+ </s:Fault>
35
+ </s:Body>
36
+ </s:Envelope>
@@ -1,42 +1,42 @@
1
- <?xml version="1.0"?>
2
- <s:Envelope xml:lang="en-US" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:n="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:x="http://schemas.xmlsoap.org/ws/2004/09/transfer">
3
- <s:Header>
4
- <a:Action>http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault</a:Action>
5
- <a:MessageID>uuid:CC816664-896D-46C7-9227-AE6E1231CE49</a:MessageID>
6
- <a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To>
7
- <a:RelatesTo>uuid:0CB1C49A-5054-4C12-AF30-FC60BE995DD9</a:RelatesTo>
8
- </s:Header>
9
- <s:Body>
10
- <s:Fault>
11
- <s:Code>
12
- <s:Value>s:Sender</s:Value>
13
- <s:Subcode>
14
- <s:Value>n:CannotProcessFilter</s:Value>
15
- </s:Subcode>
16
- </s:Code>
17
- <s:Reason>
18
- <s:Text xml:lang="en-US">The data source could not process the filter. The filter might be missing or it might be invalid. Change the filter and try the request again. </s:Text>
19
- </s:Reason>
20
- <s:Detail>
21
- <f:WSManFault Code="2150858778" Machine="localhost" xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault">
22
- <f:Message>
23
- <f:ProviderFault path="%systemroot%\system32\WsmWmiPl.dll" provider="WMI Provider">
24
- <f:WSManFault Code="2150858778" Machine="vagrant-2008R2" xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault">
25
- <f:Message>The specified class does not exist in the given namespace. </f:Message>
26
- </f:WSManFault>
27
- <f:ExtendedError>
28
- <p:__ExtendedStatus xmlns:cim="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/__ExtendedStatus" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="p:__ExtendedStatus_Type">
29
- <p:Description xsi:nil="true"/>
30
- <p:Operation>ExecQuery</p:Operation>
31
- <p:ParameterInfo>Select * from Win32_Processa where name=&quot;sshd.exe&quot;</p:ParameterInfo>
32
- <p:ProviderName>WinMgmt</p:ProviderName>
33
- <p:StatusCode xsi:nil="true"/>
34
- </p:__ExtendedStatus>
35
- </f:ExtendedError>
36
- </f:ProviderFault>
37
- </f:Message>
38
- </f:WSManFault>
39
- </s:Detail>
40
- </s:Fault>
41
- </s:Body>
42
- </s:Envelope>
1
+ <?xml version="1.0"?>
2
+ <s:Envelope xml:lang="en-US" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:n="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:x="http://schemas.xmlsoap.org/ws/2004/09/transfer">
3
+ <s:Header>
4
+ <a:Action>http://schemas.xmlsoap.org/ws/2004/09/enumeration/fault</a:Action>
5
+ <a:MessageID>uuid:CC816664-896D-46C7-9227-AE6E1231CE49</a:MessageID>
6
+ <a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To>
7
+ <a:RelatesTo>uuid:0CB1C49A-5054-4C12-AF30-FC60BE995DD9</a:RelatesTo>
8
+ </s:Header>
9
+ <s:Body>
10
+ <s:Fault>
11
+ <s:Code>
12
+ <s:Value>s:Sender</s:Value>
13
+ <s:Subcode>
14
+ <s:Value>n:CannotProcessFilter</s:Value>
15
+ </s:Subcode>
16
+ </s:Code>
17
+ <s:Reason>
18
+ <s:Text xml:lang="en-US">The data source could not process the filter. The filter might be missing or it might be invalid. Change the filter and try the request again. </s:Text>
19
+ </s:Reason>
20
+ <s:Detail>
21
+ <f:WSManFault Code="2150858778" Machine="localhost" xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault">
22
+ <f:Message>
23
+ <f:ProviderFault path="%systemroot%\system32\WsmWmiPl.dll" provider="WMI Provider">
24
+ <f:WSManFault Code="2150858778" Machine="vagrant-2008R2" xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault">
25
+ <f:Message>The specified class does not exist in the given namespace. </f:Message>
26
+ </f:WSManFault>
27
+ <f:ExtendedError>
28
+ <p:__ExtendedStatus xmlns:cim="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/__ExtendedStatus" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="p:__ExtendedStatus_Type">
29
+ <p:Description xsi:nil="true"/>
30
+ <p:Operation>ExecQuery</p:Operation>
31
+ <p:ParameterInfo>Select * from Win32_Processa where name=&quot;sshd.exe&quot;</p:ParameterInfo>
32
+ <p:ProviderName>WinMgmt</p:ProviderName>
33
+ <p:StatusCode xsi:nil="true"/>
34
+ </p:__ExtendedStatus>
35
+ </f:ExtendedError>
36
+ </f:ProviderFault>
37
+ </f:Message>
38
+ </f:WSManFault>
39
+ </s:Detail>
40
+ </s:Fault>
41
+ </s:Body>
42
+ </s:Envelope>