How To Create Apex Class In Salesforce?
Create an Apex class in your instance from Setup by entering Apex Classes in the Quick Find box, then selecting Apex Classes. Click New and add the following code to your new class:
global class MyWebService
{
}