Java Reference
In-Depth Information
javax.ws.rs.core.MediaType.APPLICATION_JSON)
.put(javax.ws.rs.client.Entity.entity(requestEntity,
javax.ws.rs.core.MediaType.APPLICATION_JSON));
}
public <T> T find_XML(Class<T> responseType, String id)
throws ClientErrorException {
WebTarget resource = webTarget;
resource = resource.path(java.text.MessageFormat.format(
"{0}", new Object[]{id}));
return resource.request(
javax.ws.rs.core.MediaType.APPLICATION_XML).
get(responseType);
}
public <T> T find_JSON(Class<T> responseType, String id)
throws ClientErrorException {
WebTarget resource = webTarget;
resource = resource.path(java.text.MessageFormat.format("{0}",
new Object[]{id}));
return resource.request(
javax.ws.rs.core.MediaType.APPLICATION_JSON).
get(responseType);
}
public <T> T findRange_XML(Class<T> responseType, String from,
String to) throws ClientErrorException {
WebTarget resource = webTarget;
resource = resource.path(java.text.MessageFormat.format("{0}/
{1}",
new Object[]{from, to}));
return
resource.request(javax.ws.rs.core.MediaType.APPLICATION_
XML).
get(responseType);
}
public <T> T findRange_JSON(Class<T> responseType, String from,
String to) throws ClientErrorException {
WebTarget resource = webTarget;
resource = resource.path(java.text.MessageFormat.format("{0}/
{1}",
new Object[]{from, to}));
return resource.request(
javax.ws.rs.core.MediaType.APPLICATION_JSON).
get(responseType);
}
 
Search WWH ::




Custom Search