對不起,我問了一些關於我不太瞭解的事情,但我一直在努力讓自己的工作變得有趣。訂閱TFS事件和WCF
因此,我有一個託管在IIS上的WCF服務,似乎正在工作,因爲我可以通過在瀏覽器中轉到http://servername/MyService.svc來在網絡上「看到」它。
這.SVC的樣子:
<% @ServiceHost Service="Foo.Bar" %>
相關的代碼如下所示:
[ServiceContract(Namespace = "http://schemas.microsoft.com/TeamFoundation/2005/06Services/Notification/03")]
public interface IBar
{
[OperationContract(Action = "http://schemas.microsoft.com/TeamFoundation/2005/06/Services/Notification/03/Notify", ReplyAction = "*")]
[XmlSerializerFormat(Style = OperationFormatStyle.Document)]
void Notify(string eventXml, string tfsIdentityXml);
}
和:
public class Bar : IBar
{
public void Notify(string eventXml, string tfsIdentityXml)
{
// Just some test output to see if it worked
var path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "tfs.txt");
File.WriteAllText(path, tfsIdentityXml + eventXml);
}
}
這是所有已建成和隨之而來的.DLL投入bin目錄在IIS中的站點根目錄中。
我現在想通過bissubscribe.exe(或類似的方法)訂閱TFS簽入事件。我試着做類似的事情:
bissubscribe /eventType CheckinEvent
/address http://servername/MyService.svc
/deliveryType Soap
/server mytfsserver
但沒事;它甚至不像有日誌活動。所以記住我對WCF一無所知,我做錯了什麼?我想象address
參數是一回事;我不應該把它指向.svc嗎?
答案是什麼?提供鏈接時,至少要提供一個高層次需要完成的概要。 – maxwellb 2014-05-24 00:08:08