Reputation: 3456
I tried to build Web Service Server using Play Framework 1.2.3 and got some problem:
Thanks for your help...
Upvotes: 0
Views: 402
Reputation: 54884
For the webservice described, it should be quite easy. for example, if you have an action as follows
public class Application extends Controller {
public static void sum(Float num1, Float num2) {
Float result = num1 * num2;
render(result);
}
}
and a route of
GET /webservices/sum Application.sum(format:'xml')
then all you need to do is call the service like the following
/webservices/sum?num1=10.1&num2=13.5
this will execute your action by passing in the required parameters
For your second part of the question. You would use renderBinary
in your action to return your GIF file.
Upvotes: 1