private Rpc2DocumentLiteralTranslator(XmlDocument wsdl)
{
xdoc = wsdl;
nsmgr = new XmlNamespaceManager(xdoc.NameTable);
XmlElement root = (XmlElement) xdoc.DocumentElement;
foreach (XmlAttribute a in root.Attributes)
{
if (a.Prefix == "xmlns")
{
Trace.WriteLine(a.LocalName + " = " + a.Value);
nsmgr.AddNamespace(a.LocalName, a.Value);
}
if (a.Name == "targetNamespace")
{
targetNamespace = a.Value;
}
}
if (nsmgr.HasNamespace("wsdl") == false)
{
nsmgr.AddNamespace("wsdl", "http://schemas.xmlsoap.org/wsdl/");
}
if (nsmgr.HasNamespace("xsd") == false)
{
nsmgr.AddNamespace("xsd", "http://www.w3.org/2001/XMLSchema");
}
if (nsmgr.HasNamespace("soap") == false)
{
nsmgr.AddNamespace("soap", "http://schemas.xmlsoap.org/wsdl/soap/");
}
BuildItems(nsmgr);
}