Arguably the easiest way to map from a LUN to the corresponding datastore is to use the VSC. That's manual though, no programming involved.
If you need a program or a script to do the mapping, Rick's answer already was correct:
A LUN's 'naa.' number IS its WWN, it's just another name.
To get the WWN, you use the serial-number of the LUN, convert it to its hexadecimal ASCII representation* and prefix it with "naa.60a98000". You can get the LUN serial-number using the 'lun-list-info' API call (to a filer, not to the DFM).
Hope that clears it up.
* So, a '1' is 0x31, an 'a' is 0x61 etc.