Is it possible to send a response from a service, but return something else?
You can still use setcookie/setrawcookie in Drupal, if you are sending a response, you can use Symfony to set one:

$cookie = new Cookie('name', 'value', $expire, '/', 'domain', TRUE, TRUE, TRUE);
$response-&gt;headers-&gt;setCookie($cookie);


vs

setrawcookie('name', 'value', $expire, '/', 'domain', TRUE, TRUE);


Note that the internal Drupal function that writes a cookie adds a prefix that you probably don't want.