php generated URL link
I'm not sure jQuery is really necessary here. 

If I've understood you right you could have your link pointing to a path with a menu callback which requests your token via SOAP, and then simply forwards the user on to a URL containing that token as a parameter

function MYMODULE_menu() {
  $items['goto-other-site'] = array(
    'title' =&gt; 'Forwarder',
    'type' =&gt; MENU_CALLBACK,
    'page callback' =&gt; 'MYMODULE_forwarder',
    'access arguments' =&gt; array('some permission')
  );

  return $items;
}

function MYMODULE_forwarder() {
  $token = MYMODULE_function_to_generate_token();

  if (!$token) {
    return 'An error occurred.';
  }

  // Add a query string containing the token.
  $options = array(
    'query' =&gt; array(
      'auth_token' =&gt; $token
    )
  );

  $url = 'http://other-site.com/';
  drupal_goto($url, $options);
}


Apologies if I've got the wrong end of the stick here.

UPDATE

Just a bit more to address your comments:

You can use hook_menu() to place each link in a specific menu in the system by using the menu_name key like so:

function MYMODULE_menu() {
  $items['goto-other-site'] = array(
    'title' =&gt; 'Forwarder',
    'type' =&gt; MENU_CALLBACK,
    'page callback' =&gt; 'MYMODULE_forwarder',
    'access arguments' =&gt; array('some permission'),
    'menu_name' =&gt; 'main-menu',
    'weight' =&gt; -10
  );

  return $items;
}


The weight key describes where in relation to other menu items this link should sit in the menu (a lower number means earlier in the list). When you add a menu link in this manner it will be automatically added to the correct menu so you don't need to add a custom link through the UI (you can delete the one you've already made).

Have a quick read of the Module developers guide to get familiar with that side of things, in this case you're only going to need a .info and .module file.

Hope that helps