ECF: why does IRestCall not extend IRemoteCall? [message #624976] |
Sat, 14 November 2009 18:39 |
Eclipse User |
|
|
|
Hi Holger, Hi Scott
I currently write a blog about an EMF based extension I built for ECF-REST.
I crawled through my code and it looks to me that IRestCall should
extend IRemoteCall in order to comply to the 'standardized' ECF usage
scenario.
my current usage:
ID restId =
IDFactory.getDefault().createID( RestNamespace.NAME, serviceUri );
IContainer container = ContainerFactory.getDefault().createContainer( //
RestContainer.NAME, restId );
IRemoteCall call = ECFRestUtils.getPostCall(
requestDefinition.getUrl()
, requestEntity
, resourceIdentifier );
IRemoteService remoteService =
container.getRemoteService( IRemoteService.class.getName() );
if ( remoteService == null )
{
container.registerRemoteService(
new String[] { IRemoteService.class.getName() }
, new RestService(), null );
}
remoteService =
container.getRemoteService( IRemoteService.class.getName() );
remoteService.callSync( call );
This only works if I correct IRestCall to extend IRemoteCall.
Is my usage wrong? Do I miss something?
Cheers + Thanks
André
|
|
|
Powered by
FUDForum. Page generated in 1.05672 seconds