Tuesday, February 19, 2008

No Web methods visible in WCF service hosted...workaround

Well, one real good thing that i liked about WCF is the ease by which you get a new WCF service running real quick. The best part is that Microsoft has provided a code template with sample methods and contracts in VS 2008. You just hit Run button and you are good to go. However, with such ease i had few problems that i ran into. First of all i started creating a WCF web service project under Web which is pretty similar to ASMX style of coding. I am still to figure out why Microsoft has provided an option to create an WCF service library (a dll for web service...huh!) Regardless, if you just run the WCF service first time ...don't be afraid if you see NONE of your web methods listed in IE for the WCF service you just created. That's by nature...ofcourse there are workarounds by which you can intercept client messages inbound and outbound. Keith has showed us a way by which you can see your web methods and actually inspect soap body and envelope going through your client.

http://keithelder.net/blog/archive/2008/01/15/How-to-Get-Around-WCFs-Lack-of-a-Preview-Web.aspx

intial post on how to start writing your own WCF service and concepts look at this video on my previous post - http://archdipesh.blogspot.com/2007/12/creating-service-with-windows.html
HTH- Dipesh

No comments: