private XmlRpcException DeserializeFault(IEnumerator <Node> iter)
        {
            MappingStack faultStack = new MappingStack("fault response");
            // TODO: use global action setting
            MappingAction        mappingAction = MappingAction.Error;
            XmlRpcFaultException faultEx       = ParseFault(iter, faultStack, // TODO: fix
                                                            mappingAction);

            throw faultEx;
        }
Example #2
0
        public void SerializeFaultResponse(
            Stream stm,
            XmlRpcFaultException faultEx)
        {
            FaultStruct fs;

            fs.faultCode   = faultEx.FaultCode;
            fs.faultString = faultEx.FaultString;
            XmlWriter xtw = XmlRpcXmlWriter.Create(stm, XmlRpcFormatSettings);

            xtw.WriteStartDocument();
            xtw.WriteStartElement("", "methodResponse", "");
            xtw.WriteStartElement("", "fault", "");
            Serialize(xtw, fs, new MappingActions {
                NullMappingAction = NullMappingAction.Error
            });
            WriteFullEndElement(xtw);
            WriteFullEndElement(xtw);
            xtw.Flush();
        }