* .google.magja.model.product.ProductMedia)
*/
@Override
public void delete(ProductMedia productMedia) throws ServiceException {
if (!ProductServiceUtil.validateProduct(productMedia.getProduct()))
throw new ServiceException(
"the product attribute for the media must be setted.");
List<Object> params = new LinkedList<Object>();
params.add((productMedia.getProduct().getId() != null ? productMedia
.getProduct().getId() : productMedia.getProduct().getSku()));
params.add(productMedia.getFile());
Boolean success = false;
try {
success = (Boolean) soapClient.call(
ResourcePath.ProductAttributeMediaRemove, params);
} catch (AxisFault e) {
if(debug) e.printStackTrace();
throw new ServiceException(e.getMessage());
}
if (!success)
throw new ServiceException("Error deleting the Product Media");
}