I'm doing a project. My teacher provides a server having Restful API, but it isn't for android app. I would like to develop another server (by J2EE) which can collect information of my teacher server (by using its Restful API) to provide a Restful API for my androi app. It means that my server provides web service for my android app and it's also client of my teacher server. That's my project idea. I wonder if it's possible with J2EE. If it's possible, how to send and receive HTTP messages by J2EE ? Thank you very much in advanced for your answers.
Asked
Active
Viewed 35 times
1
-
In what way the REST API isn't compatible with an android app? Your idea is possible, but really unnecessary. Contact the teachers server directly. – Dropout May 25 '15 at 14:11
1 Answers
0
Being a client to another Restful HTTP service you must use an HTTP client and it isn't really relevant if your application (as client) is developed in a J2EE context or is a standalone console application.
The Apache HttpClient is pretty common and allows you to create your GETs, POSTs, and other verbs directly. It also supports HTTPS and the typical authentication methods. Nevertheless this is a matter of preference and you can also check the answers to a question like HttpClient in java for more opinions.