2009-03-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Fri, 27 Mar 2009 15:51:43 +0000 (15:51 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Fri, 27 Mar 2009 15:51:43 +0000 (15:51 -0000)
* DefaultWsdlHelpGenerator.aspx: disable the test form
when only Soap is supported.
Bug #342073 fixed.

svn path=/trunk/mono/; revision=130400

data/net_2_0/ChangeLog
data/net_2_0/DefaultWsdlHelpGenerator.aspx

index d8889fbeb37ff9f7ba01c626dc16dd491d8f5ba1..d78bd7175feb993b1f9701dd4150e7c446eb00c2 100644 (file)
@@ -1,3 +1,9 @@
+2009-03-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * DefaultWsdlHelpGenerator.aspx: disable the test form
+       when only Soap is supported.
+       Bug #342073 fixed.
+
 2009-01-23  Atsushi Enomoto  <atsushi@ximian.com>
 
        * web.config : added .svc handler.
index 888406d136d2a97dffc9c82077b716cdc0d8fd97..0dd1bbdea3575aa17a429dcd874a75c768919acc 100644 (file)
@@ -122,15 +122,20 @@ void BuildOperationInfo ()
        
        // Protocols supported by the operation
        CurrentOperationProtocols = "";
+       WebServiceProtocols testProtocols = 0;
        ArrayList prots = FindServiceProtocols (CurrentOperationName);
        for (int n=0; n<prots.Count; n++) {
+               string prot = (string) prots [n];
                if (n != 0) CurrentOperationProtocols += ", ";
-               CurrentOperationProtocols += (string) prots[n];
+               CurrentOperationProtocols += prot;
+               if (prot == "HttpGet")
+                       testProtocols |= WebServiceProtocols.HttpGet;
+               else if (prot == "HttpPost") {
+                       testProtocols |= WebServiceProtocols.HttpPost;
+                       if (Context.Request.IsLocal)
+                               testProtocols |= WebServiceProtocols.HttpPostLocalhost;
+               }
        }
-       
-       WebServiceProtocols testProtocols = WebServiceProtocols.HttpGet | WebServiceProtocols.HttpPost;
-       if (Context.Request.IsLocal)
-           testProtocols |= WebServiceProtocols.HttpPostLocalhost;
        CurrentOperationSupportsTest = (WebServicesSection.Current.EnabledProtocols & testProtocols) != 0;
 
        // Operation format