Read up on the HTTP methods GET,PUT,POST (just those for now) to find out the differences between them and which one to use for which tasks.
Also,
you should urlencode your request url in case there are special parameters.
You should also
test your service via simple tools like a web browser to determine that the server is reachable and the services available.
Then you should verify that the environment running your
Java client can connect to the server with the services.