Given you want to connect to a “web service”, i assume that service is speaking HTTP. There are several Java libraries that speak HTTP, and if the API is actually a REST API as Milica Maksimović suspects, you are in an even better position, as there are a lot of REST libraries, too.
Also, if it’s a well-known service like Twitter or SendGrid, it may have an actual Java SDK to communicate with their API without actually doing any networking stuff.