问题
i need a webservice which listens to tfs (2010). The tfs will trigger an alert when build quality is changed. i want to process that SOAP message using a webservice. how do i create that? is there any template? i am a rookie in c# &.net...it would be much helpful if someone gives me a template...thx a lot
回答1:
You can create a WCF service to receive these alerts. Please see "How to use WCF to subscribe to the TFS 2010 Event Service [rolling up hours]".
回答2:
Instead of using this method for using WCF event handlers, I would actually use the new ISubscriber method. We additionally discuss how it works in Chapter 25 of our book, Professional Team Foundation Server 2010 by Wrox.
回答3:
The open source project TFS Global Alerts implements just that. You can browse the code and use it as a template.
回答4:
Web services generally make a request, get a response, and leave. They don't hang around listening.
TFS is capable of sending notifications. It's a fairly simple process. For starters, here is a how-to article that says:
TFS notifications are useful in sending alerts when a work item is changed, the build is completed, build property changed etc.
Edit: TFS offers several types of alerts, including email and SOAP, as explained in this posting on How To Subscribe to TFS Alerts which states:
Microsoft Team Foundation Server (TFS) contains a collection of services including version control, work item tracking, and the EventService service. EventService exposes a set of events that performs actions such as sending e-mail or a SOAP-based Web service call.
and a bit more
If you want to get notified for all new workitems, regardless of who they get assigned to, you will want a custom subscription...First option is to create alert with the BisSubscribe tool ... the preferred message delivery type: EmailHtml, EmailPlaintext, or SOAP. Default is SOAP.
来源:https://stackoverflow.com/questions/10064873/how-to-create-a-webservice-which-listens-to-tfs-2010-event-alerts