I read this post and learned that same class can be used to exposed for consuming SOAP and REST API: Exposing same apex method via SOAP and REST API?
My question is: Which of the below is the recommended approach?
Single method that be can be used for both SOAP and REST like below:
@RestResource(urlmapping = '/someUrl/*') global class SOAPRESTClass { @HttpGet webservice static void myMethod(){` System.debug('From myMethod'); } }
Create 2 methods one can be used for SOAP and other can be used as REST.
What is the best practice. Are there any side effects for option 1?