Blog

12 Nov, 2008

Webservices in Java EE

Posted by: admin In: Programming| Uncategorized

I had no idea that webservices were this easy in Java EE! Just smack on two or more annotations. Annotate the stateless session bean with @Webservice and the methods you want to expose with @WebMethod and you got yourself a webservice! That’s really nice!

1 Response to "Webservices in Java EE"

1 | Zerq

April 3rd, 2009 at 06:01

Avatar

I think they got that idea from .net which uses the [webmethod] annotation as well..

though microsoft are now using a system where theres an interface you make for the function istead and then you define the function and the result has to be serializable.

the end result is that you can choose what type of output the webservice should use.. if its between windows apps for example it will just use binary by default.

if its to some other source then its soap by default.

but you can define other outputs as well.. like Json or anything you might like (you can write a customer serializer i belive)

Comment Form