ace-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ghania ferrag <>
Subject How to query the distributions/targets with the Client Rest API?
Date Thu, 05 Sep 2013 17:04:14 GMT
Hi all,

I’m working on new web UI ( I used Vaadin for this UI) to allow our users to send distributions
to specific targets.
In our UI we have just to display all existing distributions and I wonder how to query the
distributions with the Client Rest API?
I read the following link:


Some one can tell me what is wrong with this REST-client code (I used Jersey): 
1) I suspect the path is wrong: "ace/workspaceID/distribution" ?
2) or may be REST-server is not set ?
import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.api.client.config.ClientConfig;
import com.sun.jersey.api.client.config.DefaultClientConfig;
public class ClientTest{
  public static void main(String[] args) {
  public static void  getDistributions() {
     ClientConfig config = new DefaultClientConfig();
     Client client = Client.create(config);
     WebResource service = client.resource(getBaseURI());
     // Get JSONfor application
     // Get XML for application
  private static URI getBaseURI() {
    return UriBuilder.fromUri("http://localhost:8080/ace").build();

Thanks and Regards,
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message