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;
}