Freigeben über


Fun with the WorkItemChangedEvent

I was goofing around the other day with TFS 2008 Beta 2, and decided I'd write an extension to handle some custom workflow when a work item is changed.

So I did the usual,

1) Created a web service

2) Registered the web service using Bissubscribe

Funny thing, everything worked as advertised, except, nothing in my code worked! I couldn't figure out why, and through debugging, I found that the payload being passed was empty!

As it turns out, it was a simple solution. It's all about the namespace attributes and the method signature!

[SoapDocumentMethod(Action = "https://schemas.microsoft.com/TeamFoundation/2005/06/Services/Notification/03/Notify",
RequestNamespace="https://schemas.microsoft.com/TeamFoundation/2005/06/Services/Notification/03"
)]
[WebMethod]
public void Notify(string eventXml)
{
...
}

In my case, the Request Namespace attribute was incorrect, and as such, when TFS used reflection on my web service, it got the wrong stuff, and didn't send the date.

Thought other folks might find this helpful.
Thanks to Pete Sheill (https://blogs.msdn.com/psheill/archive/2006/02/28/540945.aspx) for the helpful post...

Comments

  • Anonymous
    November 03, 2007
    I was goofing around the other day with TFS 2008 Beta 2, and decided I'd write an extension to handle
  • Anonymous
    November 04, 2007
    Mickey Gousset on Team Foundation Sidekicks - A Solution To My Problems. Jeff Beehler on Team System...