protected internal virtual string GetProxyScript(ScriptManager scriptManager, Control containingControl)
        {
            string serviceUrl = GetServiceUrl(containingControl, false);

            try {
                serviceUrl = VirtualPathUtility.Combine(containingControl.Context.Request.FilePath, serviceUrl);
            }
            catch {
                throw new ArgumentException(
                          String.Format(CultureInfo.InvariantCulture, AtlasWeb.WebService_InvalidInlineVirtualPath, serviceUrl));
            }
            return(WebServiceClientProxyGenerator.GetInlineClientProxyScript(serviceUrl,
                                                                             containingControl.Context,
                                                                             scriptManager.IsDebuggingEnabled));
        }
Exemple #2
0
        public void ProcessRequest(HttpContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            string clientProxyString = WebServiceClientProxyGenerator.GetClientProxyScript(context);

            if (clientProxyString != null)
            {
                context.Response.ContentType = "application/x-javascript";
                context.Response.Write(clientProxyString);
            }
        }