*/
public Response sendMessage(Method method, RepositoryTargetResource resource)
throws IOException
{
XStreamRepresentation representation = new XStreamRepresentation(xstream, "", mediaType);
String repoTargetId = (resource.getId() == null) ? "?undefined" : "/" + resource.getId();
String serviceURI = "service/local/repo_targets" + repoTargetId;
RepositoryTargetResourceResponse requestResponse = new RepositoryTargetResourceResponse();
requestResponse.setData(resource);
// now set the payload
representation.setPayload(requestResponse);
return RequestFacade.sendMessage(serviceURI, method, representation);
}