Thinktecture.Tools.Web.Services.CodeGeneration.R2DOperation.GetNamespace C# (CSharp) Method

GetNamespace() private method

private GetNamespace ( XmlNodeList bodyList ) : string
bodyList System.Xml.XmlNodeList
return string
        string GetNamespace(XmlNodeList bodyList)
        {
            XmlAttribute attr = bodyList[0].Attributes["namespace"];
            string ns="";
            if (attr != null)
            {
                ns = attr.Value;
                foreach (XmlElement ie in bodyList)
                {
                    if (ns != ie.Attributes["namespace"].Value)
                    {
                        throw new Rpc2DocumentLiteralTranslationException("Can't deal with operations sharing names but not namespaces.");
                    }
                }
            }
            else
            {
                throw new Rpc2DocumentLiteralTranslationException("RPC/literal body requires a namespace (WS-I).");
            }
            return ns;
        }