Example flex client for rest services