public function createLocation($contentId, Request $request)
{
$locationCreateStruct = $this->inputDispatcher->parse(new Message(array('Content-Type' => $request->headers->get('Content-Type')), $request->getContent()));
$contentInfo = $this->contentService->loadContentInfo($contentId);
try {
$createdLocation = $this->locationService->createLocation($contentInfo, $locationCreateStruct);
} catch (InvalidArgumentException $e) {
throw new ForbiddenException($e->getMessage());
}
return new Values\CreatedLocation(array('restLocation' => new Values\RestLocation($createdLocation, 0)));
}