I don't remember now if there's an easy way to do it with the API itself, but the way we have done this as a work-around is to have this sort of configuration:
NMSS --> EAIF emulator --> file
So the NMSS sends the MMS to a certain port, the EAIF emulator listens to the same port, and when it receives the MMS message, it stores it to a file (MMSEM.MMS or something like that) based on the eaifem.properties file -- MMSIN parameter.