private int setRemoteRating(ServiceContext context, GeonetParams params, String uuid, int rating) throws Exception
{
if(context.isDebugEnabled()) context.debug("Rating remote metadata with uuid:"+ uuid);
XmlRequest req = context.getBean(GeonetHttpRequestFactory.class).createXmlRequest(new URL(params.host));
Lib.net.setupProxy(context, req);
req.setAddress(params.getServletPath() +"/srv/en/"+ Geonet.Service.XML_METADATA_RATE);
req.clearParams();
req.addParam("uuid", uuid);
req.addParam("rating", rating);
Element response = req.execute();
if (!response.getName().equals(Params.RATING))
throw new BadServerResponseEx(response);
return Integer.parseInt(response.getText());