public void updateAssetBinary(@PathParam("packageName") String packageName, @PathParam("assetName") String assetName, InputStream is) {
try {
//Throws RulesRepositoryException if the package or asset does not exist
AssetItem asset = repository.loadPackage(packageName).loadAsset(assetName);
asset.checkout();
asset.updateBinaryContentAttachment(is);
asset.checkin("Update binary");
repository.save();
} catch (Exception e) {
throw new WebApplicationException(e);
}