Ejemplo n.º 1
0
        public static bool TryCreate(ReportServerInfo reportServer, out IWSWrapper result, out Exception exception)
        {
            ReportingService2005 proxy = new ReportingService2005()
            {
                Url         = reportServer.GetServiceUrl(SERVICE_NAME),
                Timeout     = reportServer.Timeout ?? -1,
                Credentials = reportServer.CreateCredentials(SERVICE_NAME)
            };

            try
            {
                proxy.ListSecureMethods();
                result    = new WSWrapper2005(proxy);
                exception = null;
                return(true);
            }
            catch (Exception e)
            {
                proxy.Dispose();
                result    = null;
                exception = e;
                return(false);
            }
        }