public void WriteRoot_Soap12Fault(object o) { WriteStartDocument(); System.Web.Services.Protocols.Soap12Fault ob = (System.Web.Services.Protocols.Soap12Fault)o; TopLevelElement(); WriteObject_Fault(ob, "Fault", "http://www.w3.org/2003/05/soap-envelope", true, false, true); }
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); } }
public System.Web.Services.Protocols.Soap12Fault ReadObject_Fault(bool isNullable, bool checkType) { System.Web.Services.Protocols.Soap12Fault ob = null; if (isNullable && ReadNull()) { return(null); } if (checkType) { System.Xml.XmlQualifiedName t = GetXsiType(); if (t == null) { } else if (t.Name != "Fault" || t.Namespace != "http://www.w3.org/2003/05/soap-envelope") { throw CreateUnknownTypeException(t); } } ob = new System.Web.Services.Protocols.Soap12Fault(); Reader.MoveToElement(); while (Reader.MoveToNextAttribute()) { if (IsXmlnsAttribute(Reader.Name)) { } else { UnknownNode(ob); } } Reader.MoveToElement(); if (Reader.IsEmptyElement) { Reader.Skip(); return(ob); } Reader.ReadStartElement(); Reader.MoveToContent(); bool b0 = false, b1 = false, b2 = false, b3 = false, b4 = false; while (Reader.NodeType != System.Xml.XmlNodeType.EndElement) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { if (Reader.LocalName == "Role" && Reader.NamespaceURI == "http://www.w3.org/2003/05/soap-envelope" && !b3) { b3 = true; ob.@Role = Reader.ReadElementString(); } else if (Reader.LocalName == "Detail" && Reader.NamespaceURI == "http://www.w3.org/2003/05/soap-envelope" && !b4) { b4 = true; ob.@Detail = ReadObject_Detail(false, true); } else if (Reader.LocalName == "Code" && Reader.NamespaceURI == "http://www.w3.org/2003/05/soap-envelope" && !b0) { b0 = true; ob.@Code = ReadObject_Code(false, true); } else if (Reader.LocalName == "Node" && Reader.NamespaceURI == "http://www.w3.org/2003/05/soap-envelope" && !b2) { b2 = true; ob.@Node = Reader.ReadElementString(); } else if (Reader.LocalName == "Reason" && Reader.NamespaceURI == "http://www.w3.org/2003/05/soap-envelope" && !b1) { b1 = true; ob.@Reason = ReadObject_Reason(false, true); } else { UnknownNode(ob); } } else { UnknownNode(ob); } Reader.MoveToContent(); } ReadEndElement(); return(ob); }
public System.Web.Services.Protocols.Soap12Fault ReadObject_Fault (bool isNullable, bool checkType) { System.Web.Services.Protocols.Soap12Fault ob = null; if (isNullable && ReadNull()) return null; if (checkType) { System.Xml.XmlQualifiedName t = GetXsiType(); if (t == null) { } else if (t.Name != "Fault" || t.Namespace != "http://www.w3.org/2003/05/soap-envelope") throw CreateUnknownTypeException(t); } ob = new System.Web.Services.Protocols.Soap12Fault (); Reader.MoveToElement(); while (Reader.MoveToNextAttribute()) { if (IsXmlnsAttribute (Reader.Name)) { } else { UnknownNode (ob); } } Reader.MoveToElement(); if (Reader.IsEmptyElement) { Reader.Skip (); return ob; } Reader.ReadStartElement(); Reader.MoveToContent(); bool b0=false, b1=false, b2=false, b3=false, b4=false; while (Reader.NodeType != System.Xml.XmlNodeType.EndElement) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { if (Reader.LocalName == "Role" && Reader.NamespaceURI == "http://www.w3.org/2003/05/soap-envelope" && !b3) { b3 = true; ob.@Role = Reader.ReadElementString (); } else if (Reader.LocalName == "Detail" && Reader.NamespaceURI == "http://www.w3.org/2003/05/soap-envelope" && !b4) { b4 = true; ob.@Detail = ReadObject_Detail (false, true); } else if (Reader.LocalName == "Code" && Reader.NamespaceURI == "http://www.w3.org/2003/05/soap-envelope" && !b0) { b0 = true; ob.@Code = ReadObject_Code (false, true); } else if (Reader.LocalName == "Node" && Reader.NamespaceURI == "http://www.w3.org/2003/05/soap-envelope" && !b2) { b2 = true; ob.@Node = Reader.ReadElementString (); } else if (Reader.LocalName == "Reason" && Reader.NamespaceURI == "http://www.w3.org/2003/05/soap-envelope" && !b1) { b1 = true; ob.@Reason = ReadObject_Reason (false, true); } else { UnknownNode (ob); } } else UnknownNode(ob); Reader.MoveToContent(); } ReadEndElement(); return ob; }