Refactor callback for soap interface