Return-Path: Delivered-To: apmail-shindig-dev-archive@www.apache.org Received: (qmail 78095 invoked from network); 4 Sep 2010 14:45:03 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 Sep 2010 14:45:03 -0000 Received: (qmail 99352 invoked by uid 500); 4 Sep 2010 14:45:03 -0000 Delivered-To: apmail-shindig-dev-archive@shindig.apache.org Received: (qmail 99193 invoked by uid 500); 4 Sep 2010 14:45:01 -0000 Mailing-List: contact dev-help@shindig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@shindig.apache.org Delivered-To: mailing list dev@shindig.apache.org Received: (qmail 99177 invoked by uid 99); 4 Sep 2010 14:44:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Sep 2010 14:44:59 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kf.zhang@gmail.com designates 209.85.216.52 as permitted sender) Received: from [209.85.216.52] (HELO mail-qw0-f52.google.com) (209.85.216.52) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Sep 2010 14:44:54 +0000 Received: by qwd7 with SMTP id 7so457970qwd.39 for ; Sat, 04 Sep 2010 07:44:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=QI6zA7gWyHoFAirMVKsDExHQtrhR+ALpOfHtGSmgSJI=; b=lJQjsdgEDbuP3Yk7x3i2pD6ZU5xkCiwFi+IVVJBtW7qIwGEyRBUA6K9KuRMdtDm5eA mgefP4XCueM81zTxigGA6xL41fQRIa8mCdnD18jeotSK7KltDzH4/Cn+ZUvdFO1iz9ZE WiWPptjymExukgJu3UvLWF3WGjcEhK0mIbJq8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=grzaB0xCfvQVxAw01VyNVr40YhF9WyMRTEAalWY1N/vQUrYXzaLKpp2I9brNMyYIWs jXr56/ttNA34Zj6xEOKH4lGo+N/A+D2W2q1VgAGaeHd3wYFmIviNGIq9F49I2YB5oUjZ KqmRYDPwFYTsjE4+/vSaiI0wRfj/LE3b+rI70= Received: by 10.229.247.16 with SMTP id ma16mr1904347qcb.90.1283611473100; Sat, 04 Sep 2010 07:44:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.214.17 with HTTP; Sat, 4 Sep 2010 07:44:13 -0700 (PDT) In-Reply-To: References: From: Kai Feng Zhang Date: Sat, 4 Sep 2010 22:44:13 +0800 Message-ID: Subject: Re: What request will go into GadgetsHandler To: dev@shindig.apache.org Content-Type: multipart/alternative; boundary=0016e6460832e24016048f701500 --0016e6460832e24016048f701500 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: quoted-printable Hi, Just checked past archived mailing list, but unluckily not found any clue about how this GadgetsHandler.java works. I found in DefaultGuiceModule.java: /** * Sets up multibinding for rpc handlers */ protected void registerGadgetHandlers() { Multibinder handlerBinder =3D Multibinder.newSetBinder(binder()= , > Object.class, Names.named("org.apache.shindig.handlers")); handlerBinder.addBinding().to(InvalidationHandler.class); handlerBinder.addBinding().to(HttpRequestHandler.class); handlerBinder.addBinding().to(GadgetsHandler.class); } So I guess GadgetsHandler.java is for rpc request, right? Simply access http://localhost:8080/rpc/gadgets/@metadata.supportedFieldswi= ll not reutrn something, because JsonRpcServlet will check if this is a jsonp request or along with some param like as "method" id "id". I just want to make sure if my guess is correct. And I also want to know under what request the method in GadgetsHanlder will be executed: @Operation(httpMethods =3D "GET", path =3D "/@metadata.supportedFields") public Set supportedFields(RequestItem request) { return ImmutableSet.copyOf(beanFilter .getBeanFields(GadgetsHandlerApi.MetadataResponse.class, 5)); } I appreciate it. Thanks, Kevin Zhang (=BF=AD=B7=E5) Gtalk: kf.zhang@gmail.com Blog: http://www.zhangkf.com Twitter: http://twitter.com/zhangkf On Fri, Sep 3, 2010 at 10:27 PM, Kai Feng Zhang wrote: > Hi, > > I am new to Shindig code, Now I am wondering with what request, code will > go into some method of GadgetsHandler.java? > > Should it be a rest reqeust? like as: > > http://localhost:8080/rest/gadgets/@metadata.supportedFields > > or > > http://localhost:8080/social/rest/gadgets/@metadata.supportedFields > > But there is "no service definied for path > gadgets/@metadata.supportedFields". And page got 501 error. > > If I access directly: > http://localhost:8080/gadgets/@metadata.supportedFields, there will be 40= 4 > error. > > I am confused, could you please help me out? > > > Thanks, > > Kevin Zhang (=BF=AD=B7=E5) > Gtalk: kf.zhang@gmail.com > Blog: http://www.zhangkf.com > Twitter: http://twitter.com/zhangkf > --0016e6460832e24016048f701500--