Hi guys!
I'm stuck with Restlet Engine configuration. Let me show my simple code
Engine.getInstance().getRegisteredClients().clear();
Engine.getInstance().getRegisteredClients().add(new HttpClientHelper(null));
Engine.getInstance().getRegisteredConverters().add(new JacksonConverter());
ClientResource resource = new ClientResource(path);
ChallengeScheme scheme = ChallengeScheme.HTTP_BASIC;
ChallengeResponse auth = new ChallengeResponse(scheme, "user", "secret");
resource.setChallengeResponse(auth);
resource.getClientInfo().getAcceptedMediaTypes().add(new Preference<MediaType>(MediaType.register("application/repo.input+xml", "Type of DTO")));
ClientControl entity = resource.get(ClientControl.class);
System.out.println(entity);
But I'm get null entity and this
WARNING: Unable to find a converter for this representation : [application/repo.input+xml]
How can I retrieve an entity regarding to the proper MediaType?
Thanks,
Alex
Hi guys!
I'm stuck with Restlet Engine configuration. Let me show my simple code
But I'm get
nullentity and thisHow can I retrieve an entity regarding to the proper MediaType?
Thanks,
Alex