A Framework for Migrating Web Applications to Web Services