namespace DGEE.Admin { using System; using Goldwater; using System.Web.Services; using DotGNU.XmlRpc; [WebService(Description="DGEE Administration User Handlers", Namespace="http://nfluid.com")] public class UserAdmin { [WebMethod("GetUser", Description="Locates and returns info about the supplied user. Users are of the form user@address")] public static String GetUser( String who ) { String res; try { String lmsg; //GWLog log = new GWLog(); //lmsg = "Getting info for user'"+who+"'"; //log.Write( GWLogLevel.LOG_DEBUG, lmsg ); GWMsgChain msg = new GWMsgChain(); msg.Add( (uint)DGF.USERNAME, who ); using ( GWMessage request = new GWMessage() ) { msg = request.SendTo( "/DGEE/ADM/GetUser", msg ); String user = msg.Get( (uint)DGF.USERNAME ); String real = msg.Get( (uint)DGF.REALNAME ); String email = msg.Get( (uint)DGF.EMAIL_ADDR ); String web = msg.Get( (uint)DGF.WEB_ADDR ); res = "User: "+user+" Real: "+real+" Email: "+email+" Web: "+web; } } catch( Exception xept ) { if( xept is Goldwater.GWException ) { Console.WriteLine( "Oh dear. Something seems to have gone wrong, probably {0}", xept.Message ); } else { Console.WriteLine( "Some other exception" ); } } return res; } } } // GoldTest