Translate() public method

public Translate ( ) : void
return void
        public void Translate()
        {
            elem.ParentNode.InsertBefore(elem.OwnerDocument.CreateComment("Changed style from rpc to document"), elem);
            elem["binding", "http://schemas.xmlsoap.org/wsdl/soap/"].Attributes["style"].Value = "document";
            portType.Translate();
            XmlNodeList soapBodies = elem.SelectNodes("wsdl:operation/wsdl:*/soap:body", nsmgr);

            foreach (XmlElement body in soapBodies)
            {
                XmlAttribute parts = body.GetAttributeNode("parts");
                if (parts != null)
                {
                    string comment = string.Format(CultureInfo.CurrentCulture, "Changed <soap:body parts=\"{0}\" ... /> to <soap:body parts=\"parameter\" ... />", parts.Value);
                    body.ParentNode.InsertBefore(body.OwnerDocument.CreateComment(comment), body);
                    parts.Value = "parameter";
                }
                string       attrComment = "";
                XmlAttribute ns          = body.GetAttributeNode("namespace");
                if (ns != null)
                {
                    attrComment = "Attribute namespace=\"" + ns.Value + "\" has been removed";
                    body.ParentNode.InsertBefore(body.OwnerDocument.CreateComment(attrComment), body);
                    body.RemoveAttribute(ns.Name);
                }
                XmlAttribute es = body.GetAttributeNode("encodingStyle");
                if (es != null)
                {
                    attrComment = "Attribute encodingStyle=\"" + es.Value + "\" has been removed";
                    body.ParentNode.InsertBefore(body.OwnerDocument.CreateComment(attrComment), body);
                    body.RemoveAttribute(es.Name);
                }
            }
        }