public void Respond(string xml)
        {
            XmlRpcRequestHandler handler = new XmlRpcRequestHandler()
                                           .Add <SampleResponder>();

            XmlRpcResponseHandler responder = new XmlRpcResponseHandler();

            using (MemoryStream input = new MemoryStream(Encoding.UTF8.GetBytes(xml)))
            {
                using (MemoryStream output = new MemoryStream())
                {
                    responder.RespondWith(
                        handler.RespondTo(input).Result,
                        output
                        )
                    .Wait();

                    output.Position = 0;

                    using (StreamReader reader = new StreamReader(output))
                    {
                        Console.WriteLine(reader.ReadToEnd());
                    }
                }
            }
        }
 public XmlRpcMiddleware(XmlRpcRequestHandler requestHandler, XmlRpcResponseHandler responseHandler)
 {
     RequestHandler  = requestHandler;
     ResponseHandler = responseHandler;
 }
 public XmlRpcMiddleware()
 {
     RequestHandler  = new XmlRpcRequestHandler();
     ResponseHandler = new XmlRpcResponseHandler();
 }