Is it possible to set Cookie Session ID from a REST Service?
You cant save off the JSESSIONID into the user attributes, eg data column, in D6 or D7. You simply do this in your code with:

$_SESSION['JSESSIONID'] = /* some value here */;


or wherever you call user_save() in your custom login you can pass $edit['data'] = array('jsessionid' =&gt; 12341234); from the user_save documentation:


  $edit: An array of fields and values to save. For example array('name'
  => 'My name'). Key / value pairs added to the $edit['data'] will be serialized and saved in the {users.data} column.


it then becomes accessible from a fully loaded $user object as simply a field of the user ... $jsessionid = $user-&gt;jsessionid; and you can use it as needed.