internal Service(WebServiceUri webServiceUri, bool traceRequest, ITracer upstreamTracer) : base(Globals.CertificateValidationComponentId, new RemoteCertificateValidationCallback(CertificateErrorHandler.CertValidationCallback), true) { this.traceRequest = traceRequest; this.tracer = ExTraceGlobals.UserPhotosTracer.Compose(upstreamTracer); base.Url = webServiceUri.Uri.OriginalString; this.serviceVersion = webServiceUri.ServerVersion; }
/// <summary> /// Validates the Source to ensure integrity before the source is added to the dynamic service engine /// </summary> /// <returns>Boolean</returns> public override bool Compile() { base.Compile(); switch (Type) { case enSourceType.SqlDatabase: if (string.IsNullOrEmpty(ConnectionString)) { WriteCompileError(Resources.CompilerError_MissingConnectionString); } break; case enSourceType.WebService: if (WebServiceUri == null) { WriteCompileError(Resources.CompilerError_MissingUri); } else { if (!Uri.IsWellFormedUriString(WebServiceUri.ToString(), UriKind.RelativeOrAbsolute)) { WriteCompileError(Resources.CompilerError_InvalidUri); } else { try { Invoker = new WebServiceInvoker(WebServiceUri); } catch (Exception ex) { string data = string.Format("<{0}>{1}\r\nDetail:\r\n{2}</{0}>", "CompilerError", "Unable to generate Web Service Proxy", ex.Message); WriteCompileError(data); } } } break; case enSourceType.Plugin: if (string.IsNullOrEmpty(AssemblyName)) { WriteCompileError(Resources.CompilerError_MissingAssemblyName); } if (string.IsNullOrEmpty(AssemblyLocation)) { WriteCompileError(Resources.CompilerError_MissingAssemblyLocation); } break; case enSourceType.Unknown: WriteCompileError(Resources.CompilerError_InvalidSourceType); break; } return(IsCompiled); }
public override IService CreateService(WebServiceUri webServiceUri, TargetServerVersion targetVersion, RequestType requestType) { Service service = new Service(webServiceUri); service.RequestServerVersionValue = new RequestServerVersion(); service.RequestServerVersionValue.Version = VersionConverter.GetRdExchangeVersionType(service.ServiceVersion); return(service); }
internal RestService(HttpAuthenticator authenticator, WebServiceUri webServiceUri, bool traceRequest, ITracer upstreamTracer) { this.authenticator = authenticator; this.componentId = Globals.CertificateValidationComponentId; this.httpHeaders = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase); this.traceRequest = traceRequest; this.tracer = upstreamTracer; this.targetUri = webServiceUri.Uri; CertificateValidationManager.RegisterCallback(this.componentId, new RemoteCertificateValidationCallback(CertificateErrorHandler.CertValidationCallback)); }
public override IService CreateService(WebServiceUri webServiceUri, TargetServerVersion targetVersion, RequestType requestType) { switch (requestType) { case RequestType.Local: case RequestType.IntraSite: case RequestType.CrossSite: return(this.CreateRestService(webServiceUri)); } return(this.CreateSoapService(webServiceUri)); }
private IService CreateSoapService(WebServiceUri webServiceUri) { return(new Service(webServiceUri, this.traceRequest, this.upstreamTracer) { RequestServerVersionValue = new RequestServerVersion(), RequestServerVersionValue = { Version = ExchangeVersionType.Exchange2012 } }); }
public override IService CreateService(WebServiceUri webServiceUri, TargetServerVersion targetVersion, RequestType requestType) { Service service = new Service(webServiceUri); service.RequestServerVersionValue = new RequestServerVersion(); if (targetVersion >= TargetServerVersion.E15) { service.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2012; } else { this.mailTipTypes &= ~MailTipTypes.Scope; service.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2010; } return(service); }
internal Service(WebServiceUri webServiceUri) : base(Globals.CertificateValidationComponentId, new RemoteCertificateValidationCallback(CertificateErrorHandler.CertValidationCallback), true, false) { base.Url = webServiceUri.Uri.OriginalString; this.serviceVersion = webServiceUri.ServerVersion; }
private IService CreateRestService(WebServiceUri webServiceUri) { this.photoRequest.PerformanceLogger.Log("ProxyOverRestService", string.Empty, 1U); return(new RestService(HttpAuthenticator.NetworkService, webServiceUri, this.traceRequest, this.upstreamTracer)); }