Java Reference
In-Depth Information
}
public void create_JSON(Object requestEntity)
throws UniformInterfaceException {
webResource.type(
javax.ws.rs.core.MediaType.APPLICATION_JSON).post(
requestEntity);
}
public <T> T findRange_XML(Class<T> responseType, String from,
String to) throws UniformInterfaceException {
WebResource resource = webResource;
resource = resource.path(
java.text.MessageFormat.format("{0}/{1}",
new Object[]{from, to}));
return resource.accept(
javax.ws.rs.core.MediaType.APPLICATION_XML).get(
responseType);
}
public <T> T findRange_JSON(Class<T> responseType,
String from, String to) throws UniformInterfaceException {
WebResource resource = webResource;
resource = resource.path(
java.text.MessageFormat.format("{0}/{1}",
new Object[]{from, to}));
return resource.accept(
javax.ws.rs.core.MediaType.APPLICATION_JSON).get(
responseType);
}
public <T> T find_XML(Class<T> responseType, String id)
throws UniformInterfaceException {
WebResource resource = webResource;
resource = resource.path(java.text.MessageFormat.format("{0}",
new Object[]{id}));
return resource.accept(
javax.ws.rs.core.MediaType.APPLICATION_XML).get(
responseType);
}
public <T> T find_JSON(Class<T> responseType, String id)
throws UniformInterfaceException {
WebResource resource = webResource;
resource = resource.path(java.text.MessageFormat.format("{0}",
new Object[]{id}));
return resource.accept(
javax.ws.rs.core.MediaType.APPLICATION_JSON).get(
responseType);
}
 
Search WWH ::




Custom Search