Hi Mita,
In order to get help, you'll need to be a little more specific about what problem you're having. When you say you "can use it through the web-service", do you mean that you can manually type a URL into a web browser using your API key, and it works? (Or equivalently, you can be logged into this site, click a link in the API documentation, and it works.)
If that's so, then it sounds like you're writing something wrong in your Java code before it calls our API.
-Eli