开发者

.NET API for Connecting to Bugzilla [closed]

开发者 https://www.devze.com 2022-12-19 16:37 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
开发者_StackOverflow

Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Closed 8 years ago.

Improve this question

I am looking for a library to connect to Bugzilla which works with C#. I did find the Bugzilla C# Proxy, but it's not quite what I'm looking for. I haven't been able to find anything else through Google searches. Does anybody have any other suggestions? Thanks.


I ended up using the Bugzilla C# Proxy for some operations and wrote a little class that fetched the bug XML when I needed more in depth information about the bug. Note I had to modify the Bugzilla C# Proxy to expose the CookieContainer so I could use it for authentication for my XML requests.

        HttpWebRequest request = (HttpWebRequest) WebRequest.Create(string.Format(_url, buggid));
        request.CookieContainer = _cookies;
        HttpWebResponse response = (HttpWebResponse)request.GetResponse();
        Stream dataStream = response.GetResponseStream();
        StreamReader reader = new StreamReader(dataStream);
        string responseFromServer = reader.ReadToEnd();
        reader.Close();
        dataStream.Close();
        response.Close();

        XmlReaderSettings settings = new XmlReaderSettings();
        settings.ProhibitDtd = false;
        settings.XmlResolver = null;
        settings.ValidationType = ValidationType.None;

        StringReader sr = new StringReader(responseFromServer);
        XmlReader xreader = XmlReader.Create(sr, settings);

        XmlDocument doc = new XmlDocument();
        doc.Load(xreader);


I met this problem also several month ago. And we did not find anything. To communicate with bugzilla we wrote cgi script, which uses internal Bugzilla api. And just call our cgi script methods by http requests from C# code.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号