There are many answers and examples in this MSDN forum forum.
In addition, when you buy or subscribe to a dataset on Azure, they have an example java. Here is an example
Go to odata4j website and download the latest version.
Add odata4j-clientbundle-xxjar to your Java build path.
You can use the following code to call the service.
ODataConsumer c = ODataConsumers .newBuilder("https://api.datamarket.azure.com/Data.ashx/Bing/Search/v1/") .setClientBehaviors(OClientBehaviors.basicAuth("accountKey", "{your account key here}")) .build(); OQueryRequest<OEntity> oRequest = c.getEntities("Web") .custom("Query", "stackoverflow bing api"); Enumerable<OEntity> entities = oRequest.execute();
source share