I really cant't see where your problem is. This sounds like a simple web service with a single WebMethod accepting a string and returning a string. If you have trouble creating a WebService, I suggest you start with this nice tutorial:
Your first C# Web Service[
^]
PS: as I see, this is
your homework, so struggle a little bit, and come here if you stuck at a more concrete step.