1

I have created a RESTful web service (using jersey in Eclipse) with Postgres database access. Both are running on my local machine. I have tested the service via the Postman client application sending some requests and getting responses as JSON to ensure that my server responds appropriately, all works fine. Now I have created a GUI (client application) using Swing for the management of the server (someone sits in front of it and manages the DB content). In addition, I want to do the following:

The overall structure of my communication processes using an Android client (in future) will be the following: Java client with GUI -- JSON --> RESTful web server <-- Android client

Use case: An Android client sends some data (text, pictures) in JSON format to the RESTful service which saves them in the Postgres DB. The Java client reads this data and displays them onto the GUI.

1 Answer 1

2

Mike, You will have to host your service on some server. Build a WAR file and deploy it on to a hosting server. Then you can call your API with the designated IP or masked name instead of localhost:8080 which I presume you are using. Also, I would recommend using a Jersy client.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you very much. I had some work so I didn't manage to work on this problem until today. I have built and deployed the war file to the Tomcat webapps directory and now everything is working fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.