4.11.1 A CIM Operation that Prompts Once with the Client Replying "yes"

This section shows how full-duplex channel is used during a GET operation to request an interactive response that receives a reply of "yes" so the operation proceeds.

First the client opens HTTP connection #1 and sends a GET request. The client includes the <OperationID> field, indicating that the client supports full-duplex.

 <s:Envelope 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" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd">
     <s:Header>
         <a:To>http://localhost:5985/wsman</a:To>
         <w:ResourceURI s:mustUnderstand="true">http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/MyTest4/UTFPSSemantics_TestBase</w:ResourceURI>
         <a:ReplyTo>
             <a:Address s:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
         </a:ReplyTo>
         <a:Action s:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action>
         <w:MaxEnvelopeSize s:mustUnderstand="true">512000</w:MaxEnvelopeSize>
         <a:MessageID>uuid:5BEBF248-219C-4771-963D-0833C321BB5E</a:MessageID>
         <w:Locale xml:lang="en-US" s:mustUnderstand="false" />
         <p:DataLocale xml:lang="en-US" s:mustUnderstand="false" />
         <p:SessionId s:mustUnderstand="false">uuid:42012234-A231-4FBF-BBCD-6F0B234E0CA5</p:SessionId>
         <p:OperationID s:mustUnderstand="false">uuid:CEB310A6-FB0B-441D-83E6-8B0C416192CF</p:OperationID>
         <p:SequenceId s:mustUnderstand="false">1</p:SequenceId>
         <w:SelectorSet>
             <w:Selector Name="uint32key">10</w:Selector>
         </w:SelectorSet>
         <w:OptionSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
             <w:Option Name="__MI_CallbackRegistration" Type="xs:int">16</w:Option>
             <w:Option Name="msftwinrm:UsePreciseArrays" Type="xs:boolean">true</w:Option>
         </w:OptionSet>
         <w:OperationTimeout>PT60.000S</w:OperationTimeout>
     </s:Header>
     <s:Body></s:Body>
 </s:Envelope>

The server responds with HTTP status 200, and the response headers include "Transfer-Encoding: chunked". The SOAP header includes the <OperationID> element, identifying itself as full-duplex capable. When the server provider prompts for confirmation, the WSMV server sends a HTTP chunk containing a Confirm event.

 <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:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd">
     <s:Header>
         <a:Action>http://schemas.xmlsoap.org/ws/2004/09/transfer/GetResponse</a:Action>
         <a:MessageID>uuid:2005A363-C7D5-4CC2-BA3F-C02201E3357B</a:MessageID>
         <p:OperationID s:mustUnderstand="false">uuid:CEB310A6-FB0B-441D-83E6-8B0C416192CF</p:OperationID>
         <p:SequenceId>1</p:SequenceId>
         <a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To>
         <a:RelatesTo>uuid:5BEBF248-219C-4771-963D-0833C321BB5E</a:RelatesTo>
         <w:OperationTimeout>PT120.000S</w:OperationTimeout>
     </s:Header>
     <s:Body>
         <i:InteractiveEvent xmlns:i="http://schemas.microsoft.com/wbem/wsman/1/cim/interactive.xsd">
             <i:EventType>Confirm</i:EventType>
             <i:Description>UTFPSSemantics_TestBase_GetInstance Confirm: Please let me continue</i:Description>
             <i:PromptType>Normal</i:PromptType>
         </i:InteractiveEvent>
     </s:Body>
 </s:Envelope>

After the user answers the prompt, the client creates the secondary HTTP connection and sends an InteractiveResponse message containing the answer to the prompt. The new HTTP request is identified as related to the previous one by having the same value in its <OperationID> element.

 <s:Envelope 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" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd">
     <s:Header>
         <a:To>http://localhost:5985/wsman</a:To>
         <w:ResourceURI s:mustUnderstand="true">http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/MyTest4/UTFPSSemantics_TestBase</w:ResourceURI>
         <a:ReplyTo>
             <a:Address s:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
         </a:ReplyTo>
         <a:Action s:mustUnderstand="true">/InteractiveResponse</a:Action>
         <w:MaxEnvelopeSize s:mustUnderstand="true">512000</w:MaxEnvelopeSize>
         <a:MessageID>uuid:5BEBF248-219C-4771-963D-0833C321BB5E</a:MessageID>
         <w:Locale xml:lang="en-US" s:mustUnderstand="false" />
         <p:DataLocale xml:lang="en-US" s:mustUnderstand="false" />
         <p:SessionId s:mustUnderstand="false">uuid:42012234-A231-4FBF-BBCD-6F0B234E0CA5</p:SessionId>
         <p:OperationID s:mustUnderstand="false">uuid:CEB310A6-FB0B-441D-83E6-8B0C416192CF</p:OperationID>
         <p:SequenceId s:mustUnderstand="false">2</p:SequenceId>
         <w:SelectorSet>
             <w:Selector Name="uint32key">10</w:Selector>
         </w:SelectorSet>
         <w:OptionSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
             <w:Option Name="__MI_CallbackRegistration" Type="xs:int">16</w:Option>
             <w:Option Name="msftwinrm:UsePreciseArrays" Type="xs:boolean">true</w:Option>
         </w:OptionSet>
         <w:OperationTimeout>PT60.000S</w:OperationTimeout>
     </s:Header>
     <s:Body>
         <i:InteractiveResponse xmlns:i="http://schemas.microsoft.com/wbem/wsman/1/cim/interactive.xsd">
             <i:EventType>Confirm</i:EventType>
             <i:Response>yes</i:Response>
         </i:InteractiveResponse>
     </s:Body>
 </s:Envelope>

The server's HTTP response to the InteractiveResponse message contains HTTP status 200 and an empty HTTP body.

The server sends the "yes" interactive response to the provider, which continues processing the operation. Once complete, the server delivers the operation response as a second chunk in the body of the original HTTP response.

 <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:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd">
     <s:Header>
         <a:Action>http://schemas.xmlsoap.org/ws/2004/09/transfer/GetResponse</a:Action>
         <a:MessageID>uuid:3FEF31AF-B531-4D02-84DA-BD0A23F419B3</a:MessageID>
         <p:OperationID s:mustUnderstand="false">uuid:CEB310A6-FB0B-441D-83E6-8B0C416192CF</p:OperationID>
         <p:SequenceId>2</p:SequenceId>
         <a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To>
         <a:RelatesTo>uuid:5BEBF248-219C-4771-963D-0833C321BB5E</a:RelatesTo>
     </s:Header>
     <s:Body>
         <p:UTFPSSemantics_TestBase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wmi/root/cimv2/mytest4/UTFPSSemantics_TestBase" xmlns:cim="http://schemas.dmtf.org/wbem/wscim/1/common" xsi:type="p:UTFPSSemantics_TestBase_Type">
             <p:octet xmlns:m="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd" xsi:nil="true" m:IsNullArray="true"/>
             <p:uint32Key>100</p:uint32Key>
         </p:UTFPSSemantics_TestBase>
     </s:Body>
 </s:Envelope>

The server then sends a zero-length chunk to signal the end of the operation and the end of the HTTP response.

The client then sends an HTTP request with the "END" message on the secondary HTTP connection, indicating that the connection is being closed, and then closes the connection.

 <s:Envelope 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" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd">
     <s:Header>
         <a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To>
         <w:ResourceURI s:mustUnderstand="true">http://schemas.microsoft.com/wbem/wsman/1/wsman/FullDuplex</w:ResourceURI>
         <a:Action s:mustUnderstand="true">http://schemas.microsoft.com/wbem/wsman/1/wsman/End</a:Action>
         <a:MessageID>uuid:467C64F4-FC51-4433-80F2-7D9F04E9CEC8</a:MessageID>
         <p:OperationID>uuid:CEB310A6-FB0B-441D-83E6-8B0C416192CF</p:OperationID>
     </s:Header>
     <s:Body></s:Body>
 </s:Envelope>

The server responds with HTTP status 200 and an empty HTTP body and then closes the secondary connection.