Opensocial does have REST and RPC api which can be accessed via the client libraries.
You find the one that suits you at- http://wiki.opensocial.org/index.php?title=Client_Libraries Thanks, Aakash Bapna http://aakash.me Date: Tue, 21 Apr 2009 13:58:57 -0300 Subject: [orkut-developer] Re: JSNI in GWT From: [email protected] To: [email protected] '# Does opensocial has a non-javascript api?' -i don't guess '# Am I right when I say that google GWT runs server side to spit out cool js that can be used client side?' -gwt is a wrapper that turns java code in javascript code and runs client side. Michael Robson Feitosa 2009/4/21 sumeet pareek <[email protected]> Am a super noob to the opensocial gadgets and containers. To be able to help could tell me if - # Does opensocial has a non-javascript api? # Am I right when I say that google GWT runs server side to spit out cool js that can be used client side? On Tue, Apr 21, 2009 at 3:54 PM, Michael R. Feitosa <[email protected]> wrote: I'm using gwt and my app can not call the java methods via jnsi, I am following the standard correct. I do not know why this is happening. can the container to accepts calls through jnsi java methods? package gwtopensocial.client; import java.util.List; import com.google.gwt.core.client.JavaScriptObject; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.gadgets.client.Gadget; import com.google.gwt.gadgets.client.UserPreferences; import com.google.gwt.gadgets.client.Gadget.ModulePrefs; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.RootPanel; @ModulePrefs(title = "GWTOpenSocial", author = "kael", author_email = "[email protected]") public class GWTOpenSocial extends Gadget<UserPreferences> implements OpenSociable { Button bt; String nome; RootPanel root; @Override public void init(UserPreferences preferences) { root = RootPanel.get(); final Button bt = new Button(); root.add(bt, 5, 56); bt.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { requestOwner(); } }); bt.setText("Get Viewer"); root.add(bt); } public native void requestOwner()/*-{ var req = opensocial.newDataRequest(); req.add(req.newFetchPersonRequest(opensocial.IdSpec.PersonId.OWNER), "owner"); req.send([email protected]::responseOwner(Lcom/google/gwt/core/client/JavaScriptObject;)); }-*/; // resposta do perfil do dono public native void responseOwner(JavaScriptObject ownerResp)/*-{ var ownerData = ownerResp.get('owner'); if (!ownerData.hadError()) { var owner = ownerData.getData(); $wnd.alert(owner.getDisplayName()); [email protected]::onGetViewer(Lcom/google/gwt/core/client/JavaScriptObject;)(ownerData); } else{ $wnd.alert(ownerData.getErrorMessage()); [email protected]::onGetViewer(Lcom/google/gwt/core/client/JavaScriptObject;)(ownerData); } }-*/; public void onGetViewer(JavaScriptObject test) { root.add(new Label(test.toString())); } @Override public void initializeFeature(OpenSocialFeature feature) { } } thanks!Michael Robson Feitosa -- Cheers Sumeet Pareek _________________________________________________________________ View your Twitter and Flickr updates from one place – Learn more! http://clk.atdmt.com/UKM/go/137984870/direct/01/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Orkut Developer Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/opensocial-orkut?hl=en -~----------~----~----~----~------~----~------~--~---

