+2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+ * DefaultWsdlHelpGenerator.aspx: the 'Message Layout' can now handle
+ self-referencing types. Fixes bug #529353.
+
2009-08-05 Atsushi Enomoto <atsushi@ximian.com>
* web.config: add WCF assemblies as references at compilation.
--%>
<%@ Import Namespace="System.Collections" %>
+<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Xml.Serialization" %>
<%@ Import Namespace="System.Xml" %>
if (elem == null) throw new InvalidOperationException ("Element not found: " + qname);
WriteElementSample (xtw, qname.Namespace, elem);
}
-
+
void WriteElementSample (XmlTextWriter xtw, string ns, XmlSchemaElement elem)
{
bool sharedAnnType = false;
{
WriteAttributes (xtw, stype.Attributes, stype.AnyAttribute);
}
-
+
+ Dictionary<XmlSchemaComplexType,int> recursed_types = new Dictionary<XmlSchemaComplexType,int> ();
void WriteComplexTypeElements (XmlTextWriter xtw, string ns, XmlSchemaComplexType stype)
{
+ int prev = 0;
+ if (recursed_types.ContainsKey (stype))
+ prev = recursed_types [stype];
+
+ if (prev > 1)
+ return;
+ recursed_types [stype] = ++prev;
+
if (stype.Particle != null)
WriteParticleComplexContent (xtw, ns, stype.Particle);
else
else if (stype.ContentModel is XmlSchemaComplexContent)
WriteComplexContent (xtw, ns, (XmlSchemaComplexContent)stype.ContentModel);
}
+ prev = recursed_types [stype];
+ recursed_types [stype] = --prev;
}
void WriteAttributes (XmlTextWriter xtw, XmlSchemaObjectCollection atts, XmlSchemaAnyAttribute anyat)