All thos
A
on server side, gadget.config.init will be called and init those services,
which are injected by OsapiServicesConfigContributor,  
OsapiServicesConfig
OsapiServicesConfigContributor will finally call 
http:
http://localhost:8080/vulcan/shindig/rpc?method=sy
those methods and then that's the logic of you said. 

Thanks
Best Regar

Thanks
Best Regards,

Qiao Yun, Sun(Grace)
IBM P
T
Best Re

Qiao Yun, Su
Q
IBM Project Vulcan De
China Software Development Lab(
Email:[email protected]
Tel: (86-10) 
Tel: (86-10) 82451085


�n��: �k���s�C

Address: 2F, NO. 28 BUILDING, ZHONG GUAN CUN SOFTWARE PARK, NO.8 
DONGBEIWANG WESTEN ROAD, BEIJING, 100Address: 2F, NO. 28 BUILDING, ZHONG GUAN 
CUN SOFTWARE PARK, NO.8 
DONGBEIWANG WESTEN ROAD, BEIJING, 100193





From:
Gregg Horan <[email protected]>
To:
"[email protected]" <[email protected]>
Date:
11/16/2010 07:58 AM
Subject:
gadgets.rpc bindings



I'm having difficulty with the osapi & osapi.services sections of the 
container.js config.  I was hoping for some feedback about where I might 
be in error... below:

I'm trying to avoid the dynamic listMethods registration in 
gadgetsrpctransport.js, so I explicitly define the supported methods:
"gadgets.rpc" : 
["gadgets.metadata","appdata.get","cache.invalidate","people.supportedFields","people.get","appdata.update","http.get","appdata.delete","appdata.create"]

This should result in those methods being supported by the osapi calls and 
will use gadgets.rpc (which still goes to the "http://%host%/rpc"; 
JsonRpcServlet as a JSON body POST).  Unlisted methods will 
fail/unsupported.

I ask because I can't get it to work this way, and trying to debug some 
things has made me further confused....
-In gadgetsrpctransport.js init, I see that the 'services' object has my 
gadget.rpc definition, but also a 'http://%hosts%/rpc' entry, which seems 
to have *all* methods (even though it's not listed in my container.js 
file).
-Watching osapi._registerMethod run, I see that the "http://%host%/rpc"; 
big list go through and register against that URL as the transport 
(w/resolved host name).
Just after that, my explicit list goes through (called from 
gadgetsrpctransport.js) and throws errors for each method - "duplicate 
definition" - because it's already been defined for the servlet transport.

Is the intention that you can hit the servlet directly and any method 
would work... but only the registered ones will work via osapi 
abstraction?

Thanks for any advice,
Gregg


Reply via email to