Although I have not tried it, I believe the safest way to withdraw an application would be:
1/ call the USCIS customer service to request an Infopass
2/ then schedule the Infopass
3/ at the District Office, remit in person a letter requesting withdrawal of the application (on plain paper, with mention of the applicant name and A# as well as case number)
The Officers at the DO would either be able to electronically withdraw the application based on the written request or would send the written request to the appropriate place at the Service Center.
P.S.: The applicant ideally should keep a copy of the withdrawal letter just in case the original gets lost.