void WriteComplexTypeSample(XmlTextWriter xtw, XmlSchemaComplexType stype, XmlQualifiedName rootName, int id)
{
string ns = rootName.Namespace;
if (rootName.Name.IndexOf("[]") != -1) rootName = arrayType;
if (currentUse == SoapBindingUse.Encoded) {
string pref = xtw.LookupPrefix(rootName.Namespace);
if (pref == null) pref = "q1";
xtw.WriteStartElement(pref, rootName.Name, rootName.Namespace);
ns = "";
}
else
xtw.WriteStartElement(rootName.Name, rootName.Namespace);
if (id != -1) {
xtw.WriteAttributeString("id", "id" + id);
if (rootName != arrayType)
xtw.WriteAttributeString("type", XmlSchema.InstanceNamespace, GetQualifiedNameString(xtw, rootName));
}
WriteComplexTypeAttributes(xtw, stype);
WriteComplexTypeElements(xtw, ns, stype);
xtw.WriteEndElement();
}