I want to make a web service ( with post,get,delete - REST ) and 2 clients for it. The first client will be on JavaScript and he will need to comunicate with the web service and the second client is a desktop application. I was searching the internet for a solution to make the communication secure but I haven't find one. Is it possible ?
I can't use SSL because this is a home project.
Also, I can't use websockets.
Here are some options (though I imagine you are already considering these):
As deceze mentions, you can create a self-signed cert. I have done it several times. Here is a good how-to/tutorial. If you are in Windows, then the question that Farray mentioned might be helpful.
Though difficult to do correctly, you can encrypt your data before transferring it, but this adds a lot to your code, especially since you need to do it at the service server AND two different clients. It will be especially difficult to do with javascript (but it CAN be done, see Kevin Vaughan's answer to this question).