How do I use web sharing in mac to allow access to files from machines outside of my local network? I want my web-service to be accessible from out side of my local network.

I am using MAMP and I have also started web-sharing on my local machine, but it is working only locally.

I want any file to be accessible from another machine which is not in network.
You'll have to try a dynamic DNS service (like DynDNS, http://dyn.com/dns/) to detect your machine's external (probably dynamic) IP address and keep it mapped to a specific DNS name. 

The other option would be to get a shared hosting account and push your content up to a remote web server. I use A2hosting for that, but there are hundreds of similar hosting services.