LoadRunner Script Retrieve HTTP response value

For a web page application performance testing

I record the login process in scripts but failed when I replay.

After browser send the credential to server to authenticate, the target server response a SOAP in body of HTTP response. For any action client browser takes after that needs to send 2 tokens (hashed) back to server to show it's authenticated. In normal excerising, those 2 tokens are generated by a javascript which will be invocated when user client any links or button. I know the algorithm of token generation, In LR script, I need to let script to send out those 2 token headers. I think there are 2 solutions:

1) Customize script to retrieve SOAP body in reponse first and then generate tokens to enclose in request. I have the blocker issue: how to retrieve SOAP body in script? or how to access parameter in script (seems response can be stored in parameter)?

2) To invocate the javascript in script, this seems more complicated, because you have to ask LR to call javascript for all actions, how to customize the script in this way?

anybody can help me on this?

Thanks,

Song