xp-framework/xp-framework — pull request #262 by thekid (2013-03-26 15:20:22+00:00)
Title: REST: Handlers from base class invoked with wrong instance

Imagine the following:

```php
abstract class Resource extends Object {
#[@webmethod(verb= 'GET', path= '/ping')]
public function ping() { return 'OK'; }
}

#[@webservice(path= '/books')]
class BooksResource extends Resource {
// ...
}
```

This will yield an error *Cannot instantiate abstract class Resource* because `RestContext` tries to instantiate the methods *declaring* class instead of the real handler.