I did some experiments to accomplish this, however not actually implemeneted it becuase we decided to drop the ESX 3.0 support.
I did using c#, so it may give u a little hint.
I have created two dll files using two wsdls with different dll names and different namespaces.
I have written every class/method twice under two namespaces (like Host and Host25, Host is under namespace VimApi and Host25 under Vim25Api)
I then followed the sample to get the supported API of connected esx and then convert the managed object if that is different then the connected one (then my wrapper class knows which class it is, Host or Host25).