When you are developing a plug in or add in for a software some time you have a requirement for developing webservice hosting in DLL. I have found a great link which describes all the things.
here is the link..
http://www.codeproject.com/KB/aspnet/wsinaclasslibrary.aspx