Entities operation = Entities.UPDATE;
WebResource resource = service.path(operation.path).path(entityType).path(entityName);
if (effectiveTime != null) {
resource = resource.queryParam("effective", SchemaHelper.formatDateUTC(effectiveTime));
}
ClientResponse clientResponse = resource
.header("Cookie", AUTH_COOKIE_EQ + authenticationToken)
.accept(operation.mimeType).type(MediaType.TEXT_XML)
.method(operation.method, ClientResponse.class, entityStream);
checkIfSuccessful(clientResponse);
return parseAPIResult(clientResponse);