/// <summary> /// Commits the member object on master server, will be called by slave /// </summary> /// <param name="domainID">domain id</param> /// <param name="member">member object to be committed</param> /// <param name="sn">shallow node object, but currently unused</param> /// <returns>true if success</returns> public bool CommitOnMaster(string domainID, Member member, ShallowNode sn) { Store store = Store.GetStore(); Domain domain = store.GetDomain(domainID); string userID = store.GetUserIDFromDomainID(domain.ID); HostNode mNode = HostNode.GetMaster(domainID); bool result = false; if (mNode == null) { return(false); } try { Node ModifiedNode = member as Node; log.Debug("going to call xnode constr and loading its : "); XmlDocument xNode = new XmlDocument(); xNode.LoadXml(ModifiedNode.Properties.ToString()); log.Debug("modifiednode.prop.string is : " + ModifiedNode.Properties.ToString()); SimiasConnection smConn = new SimiasConnection(domainID, userID, SimiasConnection.AuthType.PPK, mNode); SimiasWebService svc = new SimiasWebService(); svc.Url = mNode.PublicUrl; smConn.Authenticate(); smConn.InitializeWebClient(svc, "Simias.asmx"); log.Debug("going to call svc.commitdomainmember"); result = svc.CommitDomainMember(domain.ID, xNode); log.Debug("returned from web-service call and return is " + result); } catch (Exception ex) { log.Debug("simiasconnection to master failed: " + ex.ToString()); log.Debug("Could not establish connection to master for user: " + member.UserID); result = false; } return(result); }