Skip to content
This repository has been archived by the owner on Nov 19, 2022. It is now read-only.

Commit

Permalink
* DefaultWsdlHelpGenerator.aspx. Added support for C# proxy generation.
Browse files Browse the repository at this point in the history
svn path=/trunk/xsp/; revision=18088
  • Loading branch information
slluis committed Sep 14, 2003
1 parent ed91802 commit 8379a2a
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 17 deletions.
4 changes: 4 additions & 0 deletions test/ChangeLog
@@ -1,3 +1,7 @@
2003-09-14 Lluis Sanchez Gual <lluis@ximian.com>

* DefaultWsdlHelpGenerator.aspx. Added support for C# proxy generation.

2003-09-04 Lluis Sanchez Gual <lluis@ximian.com>

* Added DefaultWsdlHelpGenerator.aspx.
Expand Down
64 changes: 47 additions & 17 deletions test/DefaultWsdlHelpGenerator.aspx
Expand Up @@ -82,29 +82,57 @@ void BuildOperationInfo ()
void BuildParameters (ArrayList list, OperationMessage opm)
{
Message msg = descriptions.GetMessage (opm.Message);
MessagePart part = msg.Parts[0];
XmlSchemaElement elem = (XmlSchemaElement) schemas.Find (part.Element, typeof(XmlSchemaElement));
XmlSchemaComplexType ctype = (XmlSchemaComplexType) elem.SchemaType;
XmlSchemaSequence seq = ctype.Particle as XmlSchemaSequence;
if (seq == null) return;
foreach (XmlSchemaObject ob in seq.Items)
if (msg.Parts.Count > 0 && msg.Parts[0].Name == "parameters")
{
Parameter p = new Parameter();
p.Description = "No additional remarks";
if (ob is XmlSchemaElement)
MessagePart part = msg.Parts[0];
XmlSchemaComplexType ctype;
if (part.Element == XmlQualifiedName.Empty)
{
XmlSchemaElement selem = GetRefElement ((XmlSchemaElement)ob);
p.Name = selem.Name;
p.Type = selem.SchemaTypeName.Name;
ctype = (XmlSchemaComplexType) schemas.Find (part.Type, typeof(XmlSchemaComplexType));
}
else
{
p.Name = "Unknown";
p.Type = "Unknown";
XmlSchemaElement elem = (XmlSchemaElement) schemas.Find (part.Element, typeof(XmlSchemaElement));
ctype = (XmlSchemaComplexType) elem.SchemaType;
}
XmlSchemaSequence seq = ctype.Particle as XmlSchemaSequence;
if (seq == null) return;
foreach (XmlSchemaObject ob in seq.Items)
{
Parameter p = new Parameter();
p.Description = "No additional remarks";
if (ob is XmlSchemaElement)
{
XmlSchemaElement selem = GetRefElement ((XmlSchemaElement)ob);
p.Name = selem.Name;
p.Type = selem.SchemaTypeName.Name;
}
else
{
p.Name = "Unknown";
p.Type = "Unknown";
}
list.Add (p);
}
}
else
{
foreach (MessagePart part in msg.Parts)
{
Parameter p = new Parameter ();
p.Description = "No additional remarks";
p.Name = part.Name;
if (part.Element == XmlQualifiedName.Empty)
p.Type = part.Type.Name;
else
{
XmlSchemaElement elem = (XmlSchemaElement) schemas.Find (part.Element, typeof(XmlSchemaElement));
p.Type = elem.SchemaTypeName.Name;
}
list.Add (p);
}
list.Add (p);
}
}
Expand Down Expand Up @@ -181,6 +209,8 @@ class Parameter
<a class="method" href='<%=PageName%>'>Overview</a><br>
<div class="smallSeparator"></div>
<a class="method" href='<%=PageName + "?wsdl"%>'>Service Description</a>
<div class="smallSeparator"></div>
<a class="method" href='<%=PageName + "?code=cs"%>'>C# proxy</a>
<br><br>
<asp:repeater id="BindingsRepeater" runat=server>
<itemtemplate name="itemtemplate">
Expand Down

0 comments on commit 8379a2a

Please sign in to comment.