Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorKornél Pál <kornelpal@gmail.com>2009-01-07 16:13:18 +0300
committerKornél Pál <kornelpal@gmail.com>2009-01-07 16:13:18 +0300
commite3893c2888d62ce62e507bed9a29838545adaf4a (patch)
treeed5001d66ddd5fd3d8a314762b92191ea0fea30b /data
parent48279fef4df8c37d3206a347edca44a2c29f5e81 (diff)
DefaultWsdlHelpGenerator.aspx: Move <script> at the end of <head> that will make Visual Studio recognize the web service disco reference. Contributed under MIT/X11 license.
svn path=/trunk/mono/; revision=122652
Diffstat (limited to 'data')
-rw-r--r--data/net_2_0/ChangeLog7
-rw-r--r--data/net_2_0/DefaultWsdlHelpGenerator.aspx135
2 files changed, 74 insertions, 68 deletions
diff --git a/data/net_2_0/ChangeLog b/data/net_2_0/ChangeLog
index b89074af1b3..3d84b97eeb4 100644
--- a/data/net_2_0/ChangeLog
+++ b/data/net_2_0/ChangeLog
@@ -1,3 +1,10 @@
+2009-01-07 Kornél Pál <kornelpal@gmail.com>
+
+ * DefaultWsdlHelpGenerator.aspx: Move <script> at the end of <head> that
+ will make Visual Studio recognize the web service disco reference.
+
+ Contributed under MIT/X11 license.
+
2008-12-03 Marek Habersack <mhabersack@novell.com>
* machine.config: rename serviceModelHostingEnvironment to
diff --git a/data/net_2_0/DefaultWsdlHelpGenerator.aspx b/data/net_2_0/DefaultWsdlHelpGenerator.aspx
index e5b830e8a71..888406d136d 100644
--- a/data/net_2_0/DefaultWsdlHelpGenerator.aspx
+++ b/data/net_2_0/DefaultWsdlHelpGenerator.aspx
@@ -34,73 +34,6 @@
<%@ Page debug="true" %>
<html>
-<script language="javascript" type="text/javascript">
-var req;
-function getXML (command, url, qs) {
- if (url == "" || url.substring (0, 4) != "http")
- return;
-
- var post_data = null;
- req = getReq ();
- req.onreadystatechange = stateChange;
- if (command == "GET") {
- url = url + "?" + qs;
- } else {
- post_data = qs;
- }
- req.open (command, url, true);
- if (command == "POST")
- req.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
- req.send (post_data);
-}
-
-function stateChange () {
- if (req.readyState == 4) {
- var node = document.getElementById("testresult_div");
- var text = "";
- if (req.status == 200) {
- node.innerHTML = "<div class='code-xml'>" + formatXml (req.responseText) + "</div>";
- } else {
- var ht = "<b style='color: red'>" + formatXml (req.status + " - " + req.statusText) + "</b>";
- if (req.responseText != "")
- ht = ht + "\n<div class='code-xml'>" + formatXml (req.responseText) + "</div>";
- node.innerHTML = ht;
-
- }
- }
-}
-
-function formatXml (text)
-{
- var re = / /g;
- text = text.replace (re, "&nbsp;");
-
- re = /\t/g;
- text = text.replace (re, "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
-
- re = /\<\s*(\/?)\s*(.*?)\s*(\/?)\s*\>/g;
- text = text.replace (re,"{blue:&lt;$1}{maroon:$2}{blue:$3&gt;}");
-
- re = /{(\w*):(.*?)}/g;
- text = text.replace (re,"<span style='color:$1'>$2</span>");
-
- re = /"(.*?)"/g;
- text = text.replace (re,"\"<span style='color:purple'>$1</span>\"");
-
- re = /\r\n|\r|\n/g;
- text = text.replace (re, "<br/>");
-
- return text;
-}
-
-function getReq () {
- if (window.XMLHttpRequest) {
- return new XMLHttpRequest(); // Firefox, Safari, ...
- } else if (window.ActiveXObject) {
- return new ActiveXObject("Microsoft.XMLHTTP");
- }
-}
-</script>
<script language="C#" runat="server">
ServiceDescriptionCollection descriptions;
@@ -1615,7 +1548,73 @@ public class HtmlSampleGenerator: SampleGenerator
A:hover { color: blue }
</style>
-<script>
+<script language="javascript" type="text/javascript">
+var req;
+function getXML (command, url, qs) {
+ if (url == "" || url.substring (0, 4) != "http")
+ return;
+
+ var post_data = null;
+ req = getReq ();
+ req.onreadystatechange = stateChange;
+ if (command == "GET") {
+ url = url + "?" + qs;
+ } else {
+ post_data = qs;
+ }
+ req.open (command, url, true);
+ if (command == "POST")
+ req.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded");
+ req.send (post_data);
+}
+
+function stateChange () {
+ if (req.readyState == 4) {
+ var node = document.getElementById("testresult_div");
+ var text = "";
+ if (req.status == 200) {
+ node.innerHTML = "<div class='code-xml'>" + formatXml (req.responseText) + "</div>";
+ } else {
+ var ht = "<b style='color: red'>" + formatXml (req.status + " - " + req.statusText) + "</b>";
+ if (req.responseText != "")
+ ht = ht + "\n<div class='code-xml'>" + formatXml (req.responseText) + "</div>";
+ node.innerHTML = ht;
+
+ }
+ }
+}
+
+function formatXml (text)
+{
+ var re = / /g;
+ text = text.replace (re, "&nbsp;");
+
+ re = /\t/g;
+ text = text.replace (re, "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
+
+ re = /\<\s*(\/?)\s*(.*?)\s*(\/?)\s*\>/g;
+ text = text.replace (re,"{blue:&lt;$1}{maroon:$2}{blue:$3&gt;}");
+
+ re = /{(\w*):(.*?)}/g;
+ text = text.replace (re,"<span style='color:$1'>$2</span>");
+
+ re = /"(.*?)"/g;
+ text = text.replace (re,"\"<span style='color:purple'>$1</span>\"");
+
+ re = /\r\n|\r|\n/g;
+ text = text.replace (re, "<br/>");
+
+ return text;
+}
+
+function getReq () {
+ if (window.XMLHttpRequest) {
+ return new XMLHttpRequest(); // Firefox, Safari, ...
+ } else if (window.ActiveXObject) {
+ return new ActiveXObject("Microsoft.XMLHTTP");
+ }
+}
+
function clearForm ()
{
document.getElementById("testFormResult").style.display="none";