Ejemplo n.º 1
0
        void WriteObject_Fault(System.Web.Services.Protocols.Soap12Fault ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
        {
            if (((object)ob) == null)
            {
                if (isNullable)
                {
                    WriteNullTagLiteral(element, namesp);
                }
                return;
            }

            System.Type type = ob.GetType();
            if (type == typeof(System.Web.Services.Protocols.Soap12Fault))
            {
            }
            else
            {
                throw CreateUnknownTypeException(ob);
            }

            if (writeWrappingElem)
            {
                WriteStartElement(element, namesp, ob);
            }

            if (needType)
            {
                WriteXsiType("Fault", "http://www.w3.org/2003/05/soap-envelope");
            }

            WriteObject_Code(ob.@Code, "Code", "http://www.w3.org/2003/05/soap-envelope", false, false, true);
            WriteObject_Reason(ob.@Reason, "Reason", "http://www.w3.org/2003/05/soap-envelope", false, false, true);
            WriteElementString("Node", "http://www.w3.org/2003/05/soap-envelope", ((ob.@Node != null) ? (ob.@Node).ToString() : null));
            WriteElementString("Role", "http://www.w3.org/2003/05/soap-envelope", ((ob.@Role != null) ? (ob.@Role).ToString() : null));
            WriteObject_Detail(ob.@Detail, "Detail", "http://www.w3.org/2003/05/soap-envelope", false, false, true);
            if (writeWrappingElem)
            {
                WriteEndElement(ob);
            }
        }