How to implement a web service wrapper