CSRF validation problem with web service


I have created a web service which is fully working. However, as soon as I enable CSRF validation in config/main.php I get an error when trying to use the web service saying:

Instead of skipping the CSRF token validation, Is there any other solution to this?

Is there a way to actually validate the CSRF Token Successfully when using web-services?

how do you generate the form? To get the CSRF token, you need to use CHtml::beginForm