You don't make web service requests using Java in a Mendix application. You could use the built-in Consume REST service action to send and receive JSON data to an external service.
https://docs.mendix.com/refguide9/integration/consume-a-rest-service/
Good luck!