public ProvisioningResponse Execute( BaseProvisioningAction action )
        {
            string responseXml = IssueRequest( action );
            ProvisioningResponse response = ProcessResponse( action, responseXml );

            return response;
        }
        private ProvisioningResponse ProcessResponse( BaseProvisioningAction action, string responseXml )
        {
            ProvisioningResponse response = new ProvisioningResponse( responseXml );
            action.Response = response;

            XmlDocument doc = new XmlDocument();
            doc.LoadXml( responseXml );

            XmlNamespaceManager ns = new XmlNamespaceManager( doc.NameTable );
            ns.AddNamespace( "hs", "google:accounts:rest:protocol" );

            if ( response.IsSuccess() )
                action.ProcessResponseXml( doc, ns );

            return response;
        }
        private string IssueRequest( BaseProvisioningAction action )
        {
            XmlDocument doc = action.GetRequestXmlTemplate();

            XmlNamespaceManager ns = new XmlNamespaceManager( doc.NameTable );
            ns.AddNamespace( "hs", "google:accounts:rest:protocol" );

            doc.SelectSingleNode( "hs:rest/hs:token", ns ).InnerText = securityToken.GetSecurityToken();
            doc.SelectSingleNode( "hs:rest/hs:domain", ns ).InnerText = domain;

            action.ProcessRequestXml( doc, ns );

            string responseXml;
            HttpStatusCode status;

            WebUtility.DoHttpPost( action.ServiceUrl, doc.OuterXml, out status, out responseXml );

            return responseXml;
        }