Receiving Team Foundation Events - Correction
The documentation for Visual Studio beta 2 gives the following example for receiving TFS events (work item change, checkin, build completed, etc.).
[SoapDocumentMethod(Action = "http://Microsoft.VisualStudio.Bis/Notify")]
[WebMethod]
public void Notify(string bisEvent)
{
...
}
In fact it should be:
[SoapDocumentMethod(Action = "http://Microsoft.VisualStudio.Bis/Notify",
RequestNamespace = "http://Microsoft.VisualStudio.Bis")]
[WebMethod]
public void Notify(string eventXml)
{
...
}
Note that the parameter name must be "eventXml" exactly, since webmethods depend on reflection to match SOAP arguments with methods. Post beta 2, it will be slightly different still:
[SoapDocumentMethod(Action = "http://schemas.microsoft.com/TeamFoundation/2005/06/Services/Notification/02/Notify" ,
RequestNamespace="http://schemas.microsoft.com/TeamFoundation/2005/06/Services/Notification/02"
)]
[WebMethod]
public void Notify(string eventXml)
{
...
}
If you don't have the attributes or the parameter name correct, you are likely to see the strange behavior of the method being called, but the parameter being null.