0

I'm getting an error red line with the javax.ws saying that it cannot be resolved. I don't know if this error will fix the rest, but should I download some sort of library for this to work?

import javax.ws.rs.client.Client;  
import javax.ws.rs.client.ClientBuilder;  
import javax.ws.rs.client.Entity;  
import javax.ws.rs.core.Response;  
import javax.ws.rs.core.MediaType;    

public class Face_Recognition {

public static void main(String[] args) {

Client client = ClientBuilder.newClient();
Entity payload = Entity.json("{  'image': 'http://instinctmagazine.com/sites/instinctmagazine.com/files/images/blog_posts/Nigel%20Campbell/2014/05/13/antonio%20banderas2.jpg',  'subject_id': 'antonio_banderas',  'gallery_name': 'actors',  'selector': 'SETPOSE',  'symmetricFill': 'true'}");
Response response = client.target("https://api.kairos.com/enroll")
  .request(MediaType.APPLICATION_JSON_TYPE)
  .header("app_id", "xxxx")
  .header("app_key", "xxxx")
  .post(payload);

System.out.println("status: " + response.getStatus());
System.out.println("headers: " + response.getHeaders());
System.out.println("body:" + response.readEntity(String.class));

}

}

I managed to fix it somehow and downloaded the external jars, but I still got one last error: http://i.imgur.com/3IYfgQG.jpg

1 Answers1

0

First, make sure you ran "refresh" on the project. If that doesn't pick up the JARs then navigate to them in Eclipse's Project Explorer, right-click on them and in the popup menu use "Build Path" > "Add to Build Path".

acardoso
  • 68
  • 5