public function createRole(APIRoleCreateStruct $roleCreateStruct)
    {
        $inputMessage = $this->outputVisitor->visit($roleCreateStruct);
        $inputMessage->headers['Accept'] = $this->outputVisitor->getMediaType('Role');

        $result = $this->client->request(
            'POST',
            $this->requestParser->generate('roles'),
            $inputMessage
        );

        $createdRole = $this->inputDispatcher->parse($result);
        $createdRoleValues = $this->requestParser->parse('role', $createdRole->id);

        $createdPolicies = array();
        foreach ($roleCreateStruct->getPolicies() as $policyCreateStruct) {
            $inputMessage = $this->outputVisitor->visit($policyCreateStruct);
            $inputMessage->headers['Accept'] = $this->outputVisitor->getMediaType('Policy');

            $result = $this->client->request(
                'POST',
                $this->requestParser->generate('policies', array('role' => $createdRoleValues['role'])),
                $inputMessage
            );

            $createdPolicy = $this->inputDispatcher->parse($result);

            // @todo Workaround for missing roleId in Policy XSD definition
            $createdPolicyArray = array(
                'id' => $createdPolicy->id,
                'roleId' => $createdRole->id,
                'module' => $createdPolicy->module,
                'function' => $createdPolicy->function,
            );

            $createdPolicy = new Policy($createdPolicyArray);
            $createdPolicies[] = $createdPolicy;
        }

        return new RoleDraft(
            array(
                'id' => $createdRole->id,
                'identifier' => $createdRole->identifier,
            ),
            $createdPolicies
        );
    }