3 // DefaultWsdlHelpGenerator.aspx:
6 // Lluis Sanchez Gual (lluis@ximian.com)
8 // (C) 2003 Ximian, Inc. http://www.ximian.com
12 <%@ Import Namespace="System.Collections" %>
13 <%@ Import Namespace="System.IO" %>
14 <%@ Import Namespace="System.Xml.Serialization" %>
15 <%@ Import Namespace="System.Xml" %>
16 <%@ Import Namespace="System.Xml.Schema" %>
17 <%@ Import Namespace="System.Web.Services.Description" %>
18 <%@ Import Namespace="System" %>
19 <%@ Import Namespace="System.Net" %>
20 <%@ Import Namespace="System.Globalization" %>
21 <%@ Import Namespace="System.Resources" %>
22 <%@ Import Namespace="System.Diagnostics" %>
23 <%@ Import Namespace="System.CodeDom" %>
24 <%@ Import Namespace="System.CodeDom.Compiler" %>
25 <%@ Import Namespace="Microsoft.CSharp" %>
26 <%@ Import Namespace="Microsoft.VisualBasic" %>
27 <%@ Import Namespace="System.Text.RegularExpressions" %>
28 <%@ Assembly name="System.Web.Services" %>
29 <%@ Page debug="true" %>
32 <script language="C#" runat="server">
34 ServiceDescriptionCollection descriptions;
37 string WebServiceName;
38 string WebServiceDescription;
41 string DefaultBinding;
42 ArrayList ServiceProtocols;
44 string CurrentOperationName;
45 string CurrentOperationBinding;
46 string OperationDocumentation;
47 string CurrentOperationFormat;
48 bool CurrentOperationSupportsTest;
51 string CurrentOperationProtocols;
52 int CodeTextColumns = 95;
54 void Page_Load(object sender, EventArgs e)
56 descriptions = (ServiceDescriptionCollection) Context.Items["wsdls"];
57 schemas = (XmlSchemas) Context.Items["schemas"];
59 ServiceDescription desc = descriptions [0];
60 if (schemas.Count == 0) schemas = desc.Types.Schemas;
62 Service service = desc.Services[0];
63 WebServiceName = service.Name;
64 DefaultBinding = desc.Bindings[0].Name;
65 WebServiceDescription = service.Documentation;
66 ServiceProtocols = FindServiceProtocols (null);
68 CurrentOperationName = Request.QueryString["op"];
69 CurrentOperationBinding = Request.QueryString["bnd"];
70 if (CurrentOperationName != null) BuildOperationInfo ();
72 PageName = HttpUtility.UrlEncode (Path.GetFileName(Request.Path), Encoding.UTF8);
74 ArrayList list = new ArrayList ();
75 foreach (ServiceDescription sd in descriptions) {
76 foreach (Binding bin in sd.Bindings)
77 if (bin.Extensions.Find (typeof(SoapBinding)) != null) list.Add (bin);
80 BindingsRepeater.DataSource = list;
84 void BuildOperationInfo ()
86 InParams = new ArrayList ();
87 OutParams = new ArrayList ();
89 Binding binding = FindBinding (CurrentOperationBinding);
90 PortType portType = descriptions.GetPortType (binding.Type);
91 Operation oper = FindOperation (portType, CurrentOperationName);
93 OperationDocumentation = oper.Documentation;
94 if (OperationDocumentation == null || OperationDocumentation == "")
95 OperationDocumentation = "No additional remarks";
97 foreach (OperationMessage opm in oper.Messages)
99 if (opm is OperationInput)
100 BuildParameters (InParams, opm);
101 else if (opm is OperationOutput)
102 BuildParameters (OutParams, opm);
105 // Protocols supported by the operation
106 CurrentOperationProtocols = "";
107 ArrayList prots = FindServiceProtocols (CurrentOperationName);
108 for (int n=0; n<prots.Count; n++) {
109 if (n != 0) CurrentOperationProtocols += ", ";
110 CurrentOperationProtocols += (string) prots[n];
113 CurrentOperationSupportsTest = prots.Contains ("HttpGet") || prots.Contains ("HttpPost");
116 OperationBinding obin = FindOperation (binding, CurrentOperationName);
118 CurrentOperationFormat = GetOperationFormat (obin);
120 InputParamsRepeater.DataSource = InParams;
121 InputFormParamsRepeater.DataSource = InParams;
122 OutputParamsRepeater.DataSource = OutParams;
125 void BuildParameters (ArrayList list, OperationMessage opm)
127 Message msg = descriptions.GetMessage (opm.Message);
128 if (msg.Parts.Count > 0 && msg.Parts[0].Name == "parameters")
130 MessagePart part = msg.Parts[0];
131 XmlSchemaComplexType ctype;
132 if (part.Element == XmlQualifiedName.Empty)
134 ctype = (XmlSchemaComplexType) schemas.Find (part.Type, typeof(XmlSchemaComplexType));
138 XmlSchemaElement elem = (XmlSchemaElement) schemas.Find (part.Element, typeof(XmlSchemaElement));
139 ctype = (XmlSchemaComplexType) elem.SchemaType;
141 XmlSchemaSequence seq = ctype.Particle as XmlSchemaSequence;
142 if (seq == null) return;
144 foreach (XmlSchemaObject ob in seq.Items)
146 Parameter p = new Parameter();
147 p.Description = "No additional remarks";
149 if (ob is XmlSchemaElement)
151 XmlSchemaElement selem = GetRefElement ((XmlSchemaElement)ob);
153 p.Type = selem.SchemaTypeName.Name;
165 foreach (MessagePart part in msg.Parts)
167 Parameter p = new Parameter ();
168 p.Description = "No additional remarks";
170 if (part.Element == XmlQualifiedName.Empty)
171 p.Type = part.Type.Name;
174 XmlSchemaElement elem = (XmlSchemaElement) schemas.Find (part.Element, typeof(XmlSchemaElement));
175 p.Type = elem.SchemaTypeName.Name;
182 string GetOperationFormat (OperationBinding obin)
185 SoapOperationBinding sob = obin.Extensions.Find (typeof(SoapOperationBinding)) as SoapOperationBinding;
187 format = sob.Style.ToString ();
188 SoapBodyBinding sbb = obin.Input.Extensions.Find (typeof(SoapBodyBinding)) as SoapBodyBinding;
190 format += " / " + sbb.Use;
195 XmlSchemaElement GetRefElement (XmlSchemaElement elem)
197 if (!elem.RefName.IsEmpty)
198 return (XmlSchemaElement) schemas.Find (elem.RefName, typeof(XmlSchemaElement));
203 ArrayList FindServiceProtocols(string operName)
205 ArrayList table = new ArrayList ();
206 Service service = descriptions[0].Services[0];
207 foreach (Port port in service.Ports)
210 Binding bin = descriptions.GetBinding (port.Binding);
211 if (bin.Extensions.Find (typeof(SoapBinding)) != null)
215 HttpBinding hb = (HttpBinding) bin.Extensions.Find (typeof(HttpBinding));
216 if (hb != null && hb.Verb == "POST") prot = "HttpPost";
217 else if (hb != null && hb.Verb == "GET") prot = "HttpGet";
220 if (prot != null && operName != null)
222 if (FindOperation (bin, operName) == null)
226 if (prot != null && !table.Contains (prot))
232 Binding FindBinding (string portName)
234 Service service = descriptions[0].Services[0];
235 foreach (Port port in service.Ports)
236 if (port.Name == portName)
237 return descriptions.GetBinding (port.Binding);
241 Operation FindOperation (PortType portType, string name)
243 foreach (Operation oper in portType.Operations) {
244 if (oper.Messages.Input.Name != null) {
245 if (oper.Messages.Input.Name == name) return oper;
248 if (oper.Name == name) return oper;
254 OperationBinding FindOperation (Binding binding, string name)
256 foreach (OperationBinding oper in binding.Operations) {
257 if (oper.Input.Name != null) {
258 if (oper.Input.Name == name) return oper;
261 if (oper.Name == name) return oper;
267 string FormatBindingName (string name)
269 if (name == DefaultBinding) return "Methods";
270 else return "Methods for binding<br>" + name;
273 string GetOpName (object op)
275 OperationBinding ob = op as OperationBinding;
276 if (ob == null) return "";
277 if (ob.Input.Name != null) return ob.Input.Name;
283 get { return Request.QueryString ["ext"] == "testform"; }
286 string GetTestResult ()
288 if (!HasFormResult) return null;
292 for (int n=0; n<Request.QueryString.Count; n++)
295 if (qs != "") qs += "&";
296 qs += Request.QueryString.GetKey(n) + "=" + Request.QueryString [n];
298 if (Request.QueryString.GetKey(n) == "ext") fill = true;
301 string location = null;
302 ServiceDescription desc = descriptions [0];
303 Service service = desc.Services[0];
304 foreach (Port port in service.Ports)
305 if (port.Name == CurrentOperationBinding)
307 SoapAddressBinding sbi = (SoapAddressBinding) port.Extensions.Find (typeof(SoapAddressBinding));
309 location = sbi.Location;
312 if (location == null)
313 return "Could not locate web service";
317 WebRequest req = WebRequest.Create (location + "/" + CurrentOperationName + "?" + qs);
318 WebResponse resp = req.GetResponse();
319 StreamReader sr = new StreamReader (resp.GetResponseStream());
320 string s = sr.ReadToEnd ();
322 return "<div class='code-xml'>" + ColorizeXml(WrapText(s,CodeTextColumns)) + "</div>";
326 string res = "<b style='color:red'>" + ex.Message + "</b>";
327 WebException wex = ex as WebException;
330 WebResponse resp = wex.Response;
332 StreamReader sr = new StreamReader (resp.GetResponseStream());
333 string s = sr.ReadToEnd ();
335 res += "<div class='code-xml'>" + ColorizeXml(WrapText(s,CodeTextColumns)) + "</div>";
343 // Proxy code generation
346 string GetProxyCode ()
348 CodeNamespace codeNamespace = new CodeNamespace();
349 CodeCompileUnit codeUnit = new CodeCompileUnit();
351 codeUnit.Namespaces.Add (codeNamespace);
353 ServiceDescriptionImporter importer = new ServiceDescriptionImporter();
355 foreach (ServiceDescription sd in descriptions)
356 importer.AddServiceDescription(sd, null, null);
358 foreach (XmlSchema sc in schemas)
359 importer.Schemas.Add (sc);
361 importer.Import(codeNamespace, codeUnit);
363 string langId = Request.QueryString ["lang"];
364 if (langId == null || langId == "") langId = "cs";
365 CodeDomProvider provider = GetProvider (langId);
366 ICodeGenerator generator = provider.CreateGenerator();
367 CodeGeneratorOptions options = new CodeGeneratorOptions();
369 StringWriter sw = new StringWriter ();
370 generator.GenerateCodeFromCompileUnit(codeUnit, sw, options);
372 return Colorize (WrapText (sw.ToString (), CodeTextColumns), langId);
375 public string CurrentLanguage
378 string langId = Request.QueryString ["lang"];
379 if (langId == null || langId == "") langId = "cs";
384 public string CurrentProxytName
387 string lan = CurrentLanguage == "cs" ? "C#" : "Visual Basic";
388 return lan + " Client Proxy";
392 private CodeDomProvider GetProvider(string langId)
394 switch (langId.ToUpper())
396 case "CS": return new CSharpCodeProvider();
397 case "VB": return new VBCodeProvider();
398 default: return null;
403 // Document generation
406 string GenerateDocument ()
408 StringWriter sw = new StringWriter ();
410 if (CurrentDocType == "wsdl")
411 descriptions [CurrentDocInd].Write (sw);
412 else if (CurrentDocType == "schema")
413 schemas [CurrentDocInd].Write (sw);
415 return Colorize (WrapText (sw.ToString (), CodeTextColumns), "xml");
418 public string CurrentDocType
420 get { return Request.QueryString ["doctype"] != null ? Request.QueryString ["doctype"] : "wsdl"; }
423 public int CurrentDocInd
425 get { return Request.QueryString ["docind"] != null ? int.Parse (Request.QueryString ["docind"]) : 0; }
428 public string CurrentDocumentName
431 if (CurrentDocType == "wsdl")
432 return "WSDL document for namespace \"" + descriptions [CurrentDocInd].TargetNamespace + "\"";
434 return "Xml Schema for namespace \"" + schemas [CurrentDocInd].TargetNamespace + "\"";
442 bool firstTab = true;
443 ArrayList disabledTabs = new ArrayList ();
447 get { return Request.QueryString["tab"] != null ? Request.QueryString["tab"] : "main" ; }
452 get { return Request.QueryString["page"] != null ? Request.QueryString["page"] : "main" ; }
457 if (CurrentOperationName != null)
459 WriteTab ("main","Overview");
460 WriteTab ("test","Test Form");
461 WriteTab ("msg","Message Layout");
465 void WriteTab (string id, string label)
467 if (!firstTab) Response.Write(" | ");
470 string cname = CurrentTab == id ? "tabLabelOn" : "tabLabelOff";
471 Response.Write ("<a href='" + PageName + "?" + GetPageContext(null) + GetDataContext() + "tab=" + id + "' style='text-decoration:none'>");
472 Response.Write ("<span class='" + cname + "'>" + label + "</span>");
473 Response.Write ("</a>");
476 string GetTabContext (string pag, string tab)
478 if (tab == null) tab = CurrentTab;
479 if (pag == null) pag = CurrentPage;
480 if (pag != CurrentPage) tab = "main";
481 return "page=" + pag + "&tab=" + tab + "&";
484 string GetPageContext (string pag)
486 if (pag == null) pag = CurrentPage;
487 return "page=" + pag + "&";
500 static string keywords_cs =
501 "(\\babstract\\b|\\bevent\\b|\\bnew\\b|\\bstruct\\b|\\bas\\b|\\bexplicit\\b|\\bnull\\b|\\bswitch\\b|\\bbase\\b|\\bextern\\b|" +
502 "\\bobject\\b|\\bthis\\b|\\bbool\\b|\\bfalse\\b|\\boperator\\b|\\bthrow\\b|\\bbreak\\b|\\bfinally\\b|\\bout\\b|\\btrue\\b|" +
503 "\\bbyte\\b|\\bfixed\\b|\\boverride\\b|\\btry\\b|\\bcase\\b|\\bfloat\\b|\\bparams\\b|\\btypeof\\b|\\bcatch\\b|\\bfor\\b|" +
504 "\\bprivate\\b|\\buint\\b|\\bchar\\b|\\bforeach\\b|\\bprotected\\b|\\bulong\\b|\\bchecked\\b|\\bgoto\\b|\\bpublic\\b|" +
505 "\\bunchecked\\b|\\bclass\\b|\\bif\\b|\\breadonly\\b|\\bunsafe\\b|\\bconst\\b|\\bimplicit\\b|\\bref\\b|\\bushort\\b|" +
506 "\\bcontinue\\b|\\bin\\b|\\breturn\\b|\\busing\\b|\\bdecimal\\b|\\bint\\b|\\bsbyte\\b|\\bvirtual\\b|\\bdefault\\b|" +
507 "\\binterface\\b|\\bsealed\\b|\\bvolatile\\b|\\bdelegate\\b|\\binternal\\b|\\bshort\\b|\\bvoid\\b|\\bdo\\b|\\bis\\b|" +
508 "\\bsizeof\\b|\\bwhile\\b|\\bdouble\\b|\\block\\b|\\bstackalloc\\b|\\belse\\b|\\blong\\b|\\bstatic\\b|\\benum\\b|" +
509 "\\bnamespace\\b|\\bstring\\b)";
511 static string keywords_vb =
512 "(\\bAddHandler\\b|\\bAddressOf\\b|\\bAlias\\b|\\bAnd\\b|\\bAndAlso\\b|\\bAnsi\\b|\\bAs\\b|\\bAssembly\\b|" +
513 "\\bAuto\\b|\\bBoolean\\b|\\bByRef\\b|\\bByte\\b|\\bByVal\\b|\\bCall\\b|\\bCase\\b|\\bCatch\\b|" +
514 "\\bCBool\\b|\\bCByte\\b|\\bCChar\\b|\\bCDate\\b|\\bCDec\\b|\\bCDbl\\b|\\bChar\\b|\\bCInt\\b|" +
515 "\\bClass\\b|\\bCLng\\b|\\bCObj\\b|\\bConst\\b|\\bCShort\\b|\\bCSng\\b|\\bCStr\\b|\\bCType\\b|" +
516 "\\bDate\\b|\\bDecimal\\b|\\bDeclare\\b|\\bDefault\\b|\\bDelegate\\b|\\bDim\\b|\\bDirectCast\\b|\\bDo\\b|" +
517 "\\bDouble\\b|\\bEach\\b|\\bElse\\b|\\bElseIf\\b|\\bEnd\\b|\\bEnum\\b|\\bErase\\b|\\bError\\b|" +
518 "\\bEvent\\b|\\bExit\\b|\\bFalse\\b|\\bFinally\\b|\\bFor\\b|\\bFriend\\b|\\bFunction\\b|\\bGet\\b|" +
519 "\\bGetType\\b|\\bGoSub\\b|\\bGoTo\\b|\\bHandles\\b|\\bIf\\b|\\bImplements\\b|\\bImports\\b|\\bIn\\b|" +
520 "\\bInherits\\b|\\bInteger\\b|\\bInterface\\b|\\bIs\\b|\\bLet\\b|\\bLib\\b|\\bLike\\b|\\bLong\\b|" +
521 "\\bLoop\\b|\\bMe\\b|\\bMod\\b|\\bModule\\b|\\bMustInherit\\b|\\bMustOverride\\b|\\bMyBase\\b|\\bMyClass\\b|" +
522 "\\bNamespace\\b|\\bNew\\b|\\bNext\\b|\\bNot\\b|\\bNothing\\b|\\bNotInheritable\\b|\\bNotOverridable\\b|\\bObject\\b|" +
523 "\\bOn\\b|\\bOption\\b|\\bOptional\\b|\\bOr\\b|\\bOrElse\\b|\\bOverloads\\b|\\bOverridable\\b|\\bOverrides\\b|" +
524 "\\bParamArray\\b|\\bPreserve\\b|\\bPrivate\\b|\\bProperty\\b|\\bProtected\\b|\\bPublic\\b|\\bRaiseEvent\\b|\\bReadOnly\\b|" +
525 "\\bReDim\\b|\\bREM\\b|\\bRemoveHandler\\b|\\bResume\\b|\\bReturn\\b|\\bSelect\\b|\\bSet\\b|\\bShadows\\b|" +
526 "\\bShared\\b|\\bShort\\b|\\bSingle\\b|\\bStatic\\b|\\bStep\\b|\\bStop\\b|\\bString\\b|\\bStructure\\b|" +
527 "\\bSub\\b|\\bSyncLock\\b|\\bThen\\b|\\bThrow\\b|\\bTo\\b|\\bTrue\\b|\\bTry\\b|\\bTypeOf\\b|" +
528 "\\bUnicode\\b|\\bUntil\\b|\\bVariant\\b|\\bWhen\\b|\\bWhile\\b|\\bWith\\b|\\bWithEvents\\b|\\bWriteOnly\\b|\\bXor\\b)";
530 string Colorize (string text, string lang)
532 if (lang == "xml") return ColorizeXml (text);
533 else if (lang == "cs") return ColorizeCs (text);
534 else if (lang == "vb") return ColorizeVb (text);
538 string ColorizeXml (string text)
540 text = text.Replace (" ", " ");
541 Regex re = new Regex ("\r\n|\r|\n");
542 text = re.Replace (text, "_br_");
544 re = new Regex ("<\\s*(\\/?)\\s*([\\s\\S]*?)\\s*(\\/?)\\s*>");
545 text = re.Replace (text,"{blue:<$1}{maroon:$2}{blue:$3>}");
547 re = new Regex ("\\{(\\w*):([\\s\\S]*?)\\}");
548 text = re.Replace (text,"<span style='color:$1'>$2</span>");
550 re = new Regex ("\"(.*?)\"");
551 text = re.Replace (text,"\"<span style='color:purple'>$1</span>\"");
554 text = text.Replace ("\t", " ");
555 text = text.Replace ("_br_", "<br>");
559 string ColorizeCs (string text)
561 text = text.Replace (" ", " ");
563 text = text.Replace ("<", "<");
564 text = text.Replace (">", ">");
566 Regex re = new Regex ("\"((((?!\").)|\\\")*?)\"");
567 text = re.Replace (text,"<span style='color:purple'>\"$1\"</span>");
569 re = new Regex ("//(((.(?!\"</span>))|\"(((?!\").)*)\"</span>)*)(\r|\n|\r\n)");
570 text = re.Replace (text,"<span style='color:green'>//$1</span><br/>");
572 re = new Regex (keywords_cs);
573 text = re.Replace (text,"<span style='color:blue'>$1</span>");
575 text = text.Replace ("\t"," ");
576 text = text.Replace ("\n","<br/>");
581 string ColorizeVb (string text)
583 text = text.Replace (" ", " ");
585 /* Regex re = new Regex ("\"((((?!\").)|\\\")*?)\"");
586 text = re.Replace (text,"<span style='color:purple'>\"$1\"</span>");
588 re = new Regex ("'(((.(?!\"\\<\\/span\\>))|\"(((?!\").)*)\"\\<\\/span\\>)*)(\r|\n|\r\n)");
589 text = re.Replace (text,"<span style='color:green'>//$1</span><br/>");
591 re = new Regex (keywords_vb);
592 text = re.Replace (text,"<span style='color:blue'>$1</span>");
594 text = text.Replace ("\t"," ");
595 text = text.Replace ("\n","<br/>");
600 // Helper methods and classes
603 string GetDataContext ()
605 return "op=" + CurrentOperationName + "&bnd=" + CurrentOperationBinding + "&";
608 string GetOptionSel (string v1, string v2)
610 string op = "<option ";
611 if (v1 == v2) op += "selected ";
612 return op + "value='" + v1 + "'>";
615 string WrapText (string text, int maxChars)
617 text = text.Replace(" />","/>");
619 string linspace = null;
623 bool inquotes = false;
625 string sublineIndent = "";
626 System.Text.StringBuilder sb = new System.Text.StringBuilder ();
627 for (int n=0; n<text.Length; n++)
631 if (c=='\r' || c=='\n' || n==text.Length-1)
633 sb.Append (linspace + sublineIndent + text.Substring (linstart, n-linstart+1));
643 if (lastc==',' || lastc=='(')
645 if (!inquotes) breakpos = n;
648 if (lincount > maxChars && breakpos >= linstart)
650 if (linspace != null)
651 sb.Append (linspace + sublineIndent);
652 sb.Append (text.Substring (linstart, breakpos-linstart));
655 lincount = linspace.Length + sublineIndent.Length + (n-breakpos);
659 if (c==' ' || c=='\t')
666 inquotes = !inquotes;
669 if (linspace == null) {
670 linspace = text.Substring (linstart, n-linstart);
677 return sb.ToString ();
686 public string Name { get { return name; } set { name = value; } }
687 public string Type { get { return type; } set { type = value; } }
688 public string Description { get { return description; } set { description = value; } }
694 <title><%=WebServiceName%> Web Service</title>
695 <style type="text/css">
696 BODY { font-family: Arial; margin-left: 20px; margin-top: 20px; font-size: x-small}
697 TABLE { font-size: x-small }
698 .title { color:dimgray; font-family: Arial; font-size:20pt; font-weight:900}
699 .operationTitle { color:dimgray; font-family: Arial; font-size:15pt; font-weight:900}
700 .method { font-size: x-small }
701 .bindingLabel { font-size: x-small; font-weight:bold; color:darkgray; line-height:8pt; display:block; margin-bottom:3px }
702 .label { font-size: small; font-weight:bold; color:darkgray }
703 .paramTable { font-size: x-small }
704 .paramTable TR { background-color: gainsboro }
705 .paramFormTable { font-size: x-small; padding: 10px; background-color: gainsboro }
706 .paramFormTable TR { background-color: gainsboro }
707 .paramInput { border: solid 1px gray }
708 .button {border: solid 1px gray }
709 .smallSeparator { height:3px; overflow:hidden }
710 .panel { background-color:whitesmoke; border: solid 1px silver; border-top: solid 1px silver }
711 .codePanel { background-color: white; font-size:x-small; padding:7px; border:solid 1px silver}
712 .code-xml { font-size:10pt; font-family:courier }
713 .code-cs { font-size:10pt; font-family:courier }
714 .code-vb { font-size:10pt; font-family:courier }
715 .tabLabelOn { font-weight:bold }
716 .tabLabelOff {color: darkgray }
717 A:link { color: black; }
718 A:visited { color: black; }
719 A:active { color: black; }
720 A:hover { color: blue }
724 function clearForm ()
726 document.getElementById("testFormResult").style.display="none";
733 <div class="title" style="margin-left:20px">
734 <span class="label">Web Service</span><br>
739 **********************************************************
743 <table border="0" width="100%" cellpadding="15px" cellspacing="15px">
744 <tr valign="top"><td width="150px" class="panel">
745 <div style="width:150px"></div>
746 <a class="method" href='<%=PageName%>'>Overview</a><br>
747 <div class="smallSeparator"></div>
748 <a class="method" href='<%=PageName + "?" + GetPageContext("wsdl")%>'>Service Description</a>
749 <div class="smallSeparator"></div>
750 <a class="method" href='<%=PageName + "?" + GetPageContext("proxy")%>'>Client proxy</a>
752 <asp:repeater id="BindingsRepeater" runat=server>
753 <itemtemplate name="itemtemplate">
754 <span class="bindingLabel"><%#FormatBindingName(DataBinder.Eval(Container.DataItem, "Name").ToString())%></span>
755 <asp:repeater id="OperationsRepeater" runat=server datasource='<%# ((Binding)Container.DataItem).Operations %>'>
757 <a class="method" href="<%#PageName%>?<%#GetTabContext("op",null)%>op=<%#GetOpName(Container.DataItem)%>&bnd=<%#DataBinder.Eval(Container.DataItem, "Binding.Name")%>"><%#GetOpName(Container.DataItem)%></a>
758 <div class="smallSeparator"></div>
765 </td><td class="panel">
767 <% if (CurrentPage == "main") {%>
770 **********************************************************
774 <p class="label">Web Service Overview</p>
775 <%#WebServiceDescription%>
777 <%} if (CurrentPage == "op") {%>
780 **********************************************************
781 Operation description
784 <span class="operationTitle"><%#CurrentOperationName%></span>
789 <% if (CurrentTab == "main") { %>
790 <span class="label">Input Parameters</span>
791 <div class="smallSeparator"></div>
792 <% if (InParams.Count == 0) { %>
793 No input parameters<br>
795 <table class="paramTable" cellspacing="1" cellpadding="5">
796 <asp:repeater id="InputParamsRepeater" runat=server>
799 <td width="150"><%#DataBinder.Eval(Container.DataItem, "Name")%></td>
800 <td width="150"><%#DataBinder.Eval(Container.DataItem, "Type")%></td>
808 <% if (OutParams.Count > 0) { %>
809 <span class="label">Output Parameters</span>
810 <div class="smallSeparator"></div>
811 <table class="paramTable" cellspacing="1" cellpadding="5">
812 <asp:repeater id="OutputParamsRepeater" runat=server>
815 <td width="150"><%#DataBinder.Eval(Container.DataItem, "Name")%></td>
816 <td width="150"><%#DataBinder.Eval(Container.DataItem, "Type")%></td>
824 <span class="label">Remarks</span>
825 <div class="smallSeparator"></div>
826 <%#OperationDocumentation%>
828 <span class="label">Technical information</span>
829 <div class="smallSeparator"></div>
830 Format: <%#CurrentOperationFormat%>
831 <br>Supported protocols: <%#CurrentOperationProtocols%>
834 <% if (CurrentTab == "test") {
835 if (CurrentOperationSupportsTest) {%>
836 Enter values for the parameters and click the 'Invoke' button to test this method:<br><br>
837 <form action="<%#PageName%>" method="GET">
838 <input type="hidden" name="page" value="<%#CurrentPage%>">
839 <input type="hidden" name="tab" value="<%#CurrentTab%>">
840 <input type="hidden" name="op" value="<%#CurrentOperationName%>">
841 <input type="hidden" name="bnd" value="<%#CurrentOperationBinding%>">
842 <input type="hidden" name="ext" value="testform">
843 <table class="paramFormTable" cellspacing="0" cellpadding="3">
844 <asp:repeater id="InputFormParamsRepeater" runat=server>
847 <td><%#DataBinder.Eval(Container.DataItem, "Name")%>: </td>
848 <td width="150"><input class="paramInput" type="text" size="20" name="<%#DataBinder.Eval(Container.DataItem, "Name")%>"></td>
852 <tr><td></td><td><input class="button" type="submit" value="Invoke"> <input class="button" type="button" onclick="clearForm()" value="Clear"></td></tr>
855 <div id="testFormResult" style="display:<%# (HasFormResult?"block":"none") %>">
856 The web service returned the following result:<br/><br/>
857 <div class="codePanel"><%#GetTestResult()%></div>
860 The test form is not available for this operation because it has parameters with a complex structure.
863 <% if (CurrentTab == "msg") { %>
868 <% if (CurrentPage == "proxy") {%>
870 **********************************************************
873 <form action="<%#PageName%>" name="langForm" method="GET">
874 Select the language for which you want to generate a proxy
875 <input type="hidden" name="page" value="<%#CurrentPage%>">
876 <SELECT name="lang" onchange="langForm.submit()">
877 <%#GetOptionSel("cs",CurrentLanguage)%>C#</option>
878 <%#GetOptionSel("vb",CurrentLanguage)%>Visual Basic</option>
883 <span class="label"><%#CurrentProxytName%></span>
884 <a href="<%#PageName + "?code=" + CurrentLanguage%>">Download</a>
886 <div class="codePanel">
887 <div class="code-<%#CurrentLanguage%>"><%#GetProxyCode ()%></div>
891 <% if (CurrentPage == "wsdl") {%>
893 **********************************************************
896 <% if (descriptions.Count > 1 || schemas.Count > 1) {%>
897 The description of this web service is composed by several documents. Click on the document you want to see:
901 for (int n=0; n<descriptions.Count; n++)
902 Response.Write ("<li><a href='" + PageName + "?" + GetPageContext(null) + "doctype=wsdl&docind=" + n + "'>WSDL document " + descriptions[n].TargetNamespace + "</a></li>");
903 for (int n=0; n<schemas.Count; n++)
904 Response.Write ("<li><a href='" + PageName + "?" + GetPageContext(null) + "doctype=schema&docind=" + n + "'>Xml Schema " + schemas[n].TargetNamespace + "</a></li>");
911 <span class="label"><%#CurrentDocumentName%></span>
912 <a href="<%=PageName + "?" + CurrentDocType + "=" + CurrentDocInd %>">Download</a>
914 <div class="codePanel">
915 <div class="code-xml"><%#GenerateDocument ()%></div>
920 <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
922 <td withd="20px"></td>