PHP makes this sort of thing dirt simple but I'd like to know how other languages do it. To standardize on a simple example, how would you implement the following webservice to sum a list of numbers:
http://server.com/sum?summands=LIST
where LIST
is a list of space-separated real numbers. For example,
http://server.com/sum?summands=1+2+3
(note that spaces can be URL-encoded as pluses) should return
<sum>6</sum>
One language per answer!
ADDED: I mean this to be more than a fluffy survey question, ie, I hope it will be useful for people who want to dive in and create their first simple webservice/API. Pointers to good tutorials on getting started with webservices/APIs are also welcome.
This is a Rosetta Stone Question, showing how a certain simple task is accomplished in various languages/frameworks.