using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Web; using System.Web.Services; using System.Web.Security; namespace Repository { /** * *

Retry Web Service.
* Invoked by RepoCleanup.

*

Copyright (c) 2002 Alexis Grandemange
* Mail: alexis.grandemange@pagebox.net

*
This program is free software; you can redistribute it and/or
	* modify it under the terms of the GNU Lesser General Public
	* License as published by the Free Software Foundation; version
	* 2.1 of the License.
	* This library is distributed in the hope that it will be useful,
	* but WITHOUT ANY WARRANTY; without even the implied warranty of
	* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
	* GNU Lesser General Public License for more details.
	* A copy of the GNU Lesser General Public License lesser.txt should be
	* included in the distribution.
*
*/ [WebService(Namespace="Repository")] public class Retry : System.Web.Services.WebService { public Retry() { //CODEGEN: This call is required by the ASP.NET Web Services Designer InitializeComponent(); } #region Component Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { } #endregion /// /// Clean up any resources being used. /// protected override void Dispose( bool disposing ) { } /// /// Cleanup a repository (retry pending operations). /// /// status /// user name /// password [WebMethod] public string Cleanup(string user, string password) { if (!FormsAuthentication.Authenticate(user, password) || !Global.archRep.isAdministrator(user)) return "Retry.Cleanup failed: invalid credentials"; Global.subRep.cleanup(); return "Retry.Cleanup performed"; } } }