private static OperationResult ExtractOperationResultFromResponse(HttpWebResponse httpWebResponse)
        {
            XDocument responseBody = httpWebResponse.GetResponseBody();
            /*
             *  <Operation xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
             *      <ID>[GUID]</ID>
             *      <Status>InProgress|Succeeded|Failed</Status>
             *      <HttpStatusCode>200|etc</HttpStatusCode>
             *      <Code>code</Code>
             *      <Message>text</Message>
             *  </Operation>
             */
            OperationResult operationResult = new OperationResult();
            if (responseBody.Root == null)
            {
                throw new AzureExtensionsException("The response did not contain a root element.");
            }

            string idValue = GetChild(responseBody.Root, "ID").Value;
            operationResult.Id = Guid.Parse(idValue);
            string statusValue = GetChild(responseBody.Root, "Status").Value;
            operationResult.Status = (OperationStatus)Enum.Parse(typeof(OperationStatus), statusValue);
            if (operationResult.Status != OperationStatus.InProgress)
            {
                operationResult.HttpStatusCode = (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), GetChild(responseBody.Root, "HttpStatusCode").Value);
            }

            if (operationResult.Status == OperationStatus.Failed)
            {
                XElement error = GetChild(responseBody.Root, "Error");
                operationResult.Code = GetChild(error, "Code").Value;
                operationResult.Message = GetChild(error, "Message").Value;
            }

            return operationResult;
        }