2009-03-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
[mono.git] / data / net_2_0 / DefaultWsdlHelpGenerator.aspx
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