Merge pull request #2377 from joelmartinez/docs-multiassembly-extension-fix
[mono.git] / mcs / class / System.Web.Services / System.Web.Services.Protocols / SoapDocumentationHandler.cs
index 178161b1c95c0c7a836f3d770efff2511fb2f7cd..61ad6a1e20eed75761bafd92e5343b1ab9842933 100644 (file)
@@ -77,13 +77,8 @@ namespace System.Web.Services.Protocols
                        if (key == "wsdl" || key == "schema" || key == "code" || key == "disco")
                                return;
                                
-#if NET_2_0
                        string help = WebServicesSection.Current.WsdlHelpGenerator.Href;
                        string path = Path.GetDirectoryName (ConfigurationManager.OpenMachineConfiguration().FilePath);
-#else
-                       string help = WSConfig.Instance.WsdlHelpPage;
-                       string path = Path.GetDirectoryName (WSConfig.Instance.ConfigFilePath);
-#endif
                        string appPath = AppDomain.CurrentDomain.GetData (".appPath").ToString ();
                        string vpath;
                        if (path.StartsWith (appPath)) {
@@ -100,10 +95,8 @@ namespace System.Web.Services.Protocols
 
                        string physPath = Path.Combine (path, help);
                        
-#if !TARGET_JVM
                        if (!File.Exists (physPath))
                                throw new InvalidOperationException ("Documentation page '" + physPath + "' not found");
-#endif
 
                        _pageHandler = PageParser.GetCompiledPageInstance (vpath, physPath, context);
                }
@@ -137,11 +130,7 @@ namespace System.Web.Services.Protocols
 
                                if (key  == "wsdl") GenerateWsdlDocument (context, req.QueryString ["wsdl"]);
                                else if (key == "schema") GenerateSchema (context, req.QueryString ["schema"]);
-#if !TARGET_JVM //code generation is not supported
                                else if (key == "code") GenerateCode (context, req.QueryString ["code"]);
-#else
-                               else if (key == "code") throw new Exception("Code generation is not supported.");
-#endif
                                else if (key == "disco") GenerateDiscoDocument (context);
                                else throw new Exception ("This should never happen");
                        }
@@ -212,7 +201,6 @@ namespace System.Web.Services.Protocols
                        GetSchemas() [di].Write (xtw);
                }
 
-#if !TARGET_JVM                
                void GenerateCode (HttpContext context, string langId)
                {
                        context.Response.ContentType = "text/plain; charset=utf-8";
@@ -256,7 +244,6 @@ namespace System.Web.Services.Protocols
 
                        return provider;
                }
-#endif
                
                internal ServiceDescriptionCollection GetDescriptions ()
                {