protocol as web service

How to convert protocol into web service or restful API and provide a link.