Restful WebService without annotations in eclipse using java

旧巷老猫 提交于 2020-01-17 05:43:08

问题


We are creating an application in android which will invoke Restful webservices.But here the problem is the web services should of without annotations as we are going to deploy them in RAD(Rational Application Developer),which is not going to recognise the annotations as it is IBM specific.So We need Restful web services without annotations. Any example source code will be very thankful

Regards, badri


回答1:


Are you talking about hosting web services or calling web services?

If you're hosting, aren't you hosting in a Servlet container? All of the major Java frameworks work within modern Servlet containers. And the jars specific to the framework do all of the annotation processing, not the Servlet container. The only real requirement is Java 5 so that you have access to annotations at all.

If you have to use Java 1.4, then you should just use an ancient action framework like Struts 1 (which I wouldn't wish on anybody). Otherwise, you're back to raw servlets, which isn't completely awful to create web services.

Of course if you're not using Servlets at all, then basically nothing out there is going to help you since Servlets are the dominant Java web paradigm.



来源:https://stackoverflow.com/questions/6533164/restful-webservice-without-annotations-in-eclipse-using-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!