public RepositoryActionResponse ExtractItem(Item item, bool overwrite) { try { //encrypt login and password string loginName = ""; string pass = ""; getloginAndPass(UserId, ref loginName, ref pass); string _url = getWSUrl(this.Url); RepositoryWebservice repo = new RepositoryWebservice(_url); repo.Credentials = new System.Net.NetworkCredential(loginName, pass); foreach (var r in item.Resources) { r.ResourceAsBase64 = string.Empty; r.ResourceContents = new byte[0]; } byte[] obj = Core.Serialization.Serializer.Serialize(item, item.GetType()); RepositoryActionResponse result = repo.Extract(this.SessionKey, obj, item.ItemId, overwrite, loginName, pass); repo.Dispose(); return result; } catch (Exception ex) { RevisionLog.Instance.Error(item, this, RevisionLog.ExtractionManager, ex.ToString()); RepositoryActionResponse response = new RepositoryActionResponse(); response.LoadException(ex); response.ItemStatus = ItemStatus.Error; response.ItemId = item.ItemId; response.ItemName = item.Name; return response; } }