Using Gateway to connect to MSN / Yahoo

I have installed Openfire 3.3 with the required plugins for the Gateway.

I am in the process of building a web based client through SMACK API, through which, a user logged on to their jabber account, can be able to chat with other persons logged on to yahoo/msn accounts. (Note… the other persons also has a jabber id, but currently they are not logged on the jabber server, but they are logged on to their respective Legacy IM servers).

I have completed the jabber to jabber chatting part. it was pretty easy using the SMACK API. But how do i solve this problem, please guide me… Thanks…