4.11.3 An Operation is Reconnected After a Network Failure

This section shows how a Robust Connection on a full-duplex channel is used during a GET operation to reconnect and complete the operation after a network failure.

First, a GET request is issued. The <OperationID> element is included, 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://PN2503012125.stbtest.microsoft.com:5985/wsman</a:To>
         <w:ResourceURI s:mustUnderstand="true">http://microsoft.test/testresource/get/helloworld</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:C12EB060-0A37-4E8A-B58B-910B4C2EFE71</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:4B37F701-FCF3-4B80-AC98-A387CE49461D</p:SessionId>
         <p:OperationID s:mustUnderstand="false">uuid:AD3A70BC-E338-4410-AE86-23F9E1D70FBE</p:OperationID>
         <p:SequenceId s:mustUnderstand="false">1</p:SequenceId>
         <w:OperationTimeout>PT2.000S</w:OperationTimeout>
     </s:Header>
     <s:Body></s:Body>
 </s:Envelope>

For this example, assume that when the server tries to respond to the operation, the network fails. When the client's Request Retry Timer expires, the client creates a new primary connection to the server and re-issues the request with the same <OperationID> value, and the mustUnderstand property of <OperationID> set to "true".

 <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://PN2503012125.stbtest.microsoft.com:5985/wsman</a:To>
         <w:ResourceURI s:mustUnderstand="true">http://microsoft.test/testresource/get/helloworld</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:C12EB060-0A37-4E8A-B58B-910B4C2EFE71</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:4B37F701-FCF3-4B80-AC98-A387CE49461D</p:SessionId>
         <p:OperationID s:mustUnderstand="true ">uuid:AD3A70BC-E338-4410-AE86-23F9E1D70FBE</p:OperationID>
         <p:SequenceId s:mustUnderstand="false">1</p:SequenceId>
         <w:OperationTimeout>PT2.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. The server sends a HTTP chunk containing an acknowledge message, indicating to the client the sequence ID of the last message that it received.

 <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/RobustConnection</w:ResourceURI>
         <a:Action s:mustUnderstand="true">http://schemas.microsoft.com/wbem/wsman/1/wsman/Acknowledge</a:Action>
         <a:MessageID>uuid:B4C2E4CA-9B86-463E-9C62-C02DEEB7BB58</a:MessageID>
         <p:OperationID>uuid:AD3A70BC-E338-4410-AE86-23F9E1D70FBE</p:OperationID>
     </s:Header>
     <s:Body>
         <p:LastSequenceIdReceived>1</p:LastSequenceIdReceived>
     </s:Body>
 </s:Envelope>

When the operation completes, the server sends an HTTP chunk containing the response to the request.

 <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:F21C1D50-3B9D-4F08-A9E8-99ECCEC2FDFF</a:MessageID>
         <p:OperationID s:mustUnderstand="false">uuid:AD3A70BC-E338-4410-AE86-23F9E1D70FBE</p:OperationID>
         <p:SequenceId>1</p:SequenceId>
         <a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To>
         <a:RelatesTo>uuid:C12EB060-0A37-4E8A-B58B-910B4C2EFE71</a:RelatesTo>
     </s:Header>
     <s:Body>
         <TestProvGetReturn xmlns="http://schemas.microsoft.com/2004/04/win/files/TestProvGetReturn">Hello Spain!</TestProvGetReturn>
     </s:Body>
 </s:Envelope>