You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by xin zhang <xi...@yahoo.com> on 2008/06/05 20:37:48 UTC

open social sample container error on php shindig server

Hi,

When I run the open social sample container hhttp://localhost/shindig/php/gadgets/files/samplecontainer/samplecontainer.html, I got "The request to the server caused an error" caused by
POST http://localhost/shindig/php/social/rest/samplecontainer/setstate 404

It is ok if start java shindig server with mvn -Prun.

Can anyone help me this?
Thanks






      

Re: open social sample container error on php shindig server

Posted by Chris Chabot <ch...@xs4all.nl>.
Even if you didn't mean to use REST, it seems the sample container is  
hard coded to use the REST protocol... hence the  'Invalid request  
JSON'  error your seeing

On Jun 6, 2008, at 4:34 PM, xin zhang wrote:

> No, I didn't use REST, I have /social/data in the url.
>
> --- On Fri, 6/6/08, Chris Chabot &lt;chabotc@xs4all.nl&gt; wrote:
> From: Chris Chabot &lt;chabotc@xs4all.nl&gt;
> Subject: Re: open social sample container error on php shindig server
> To: shindig-dev@incubator.apache.org
> Date: Friday, June 6, 2008, 9:20 AM
>
> I tried to tell you this earlier already: Just changing the URL does
> not change the protocol
>
> /social/data talks 'JSON'
> /social/rest -doesn't exist yet in php-
>
> So just changing an URL doesn't make it speak another language (REST
> instead of JSON), and that's where your error comes from. Your doing a
> REST request to a JSON handler, putting a square in a circle so to
> speak.. it just don't work that way.
>
> I think for now your better of sticking to the javascript/container/
> sample*.html files, or check out partuza (http://code.google.com/p/partuza
> ) if you need a sample container.
>
> 	-- Chris
>
> On Jun 6, 2008, at 4:12 PM, xin zhang wrote:
>
> &gt; ok, I changed the code in SampleContainer.html to
> &gt; &amp;nbsp;
> &gt; var socialDataPath = document.location.protocol + "//" +
> &gt; document.location.host
> &gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; +
> "/shindig/php/social/data/samplecontainer/";
> &gt;
> &gt; But this time I got the following error:
> &gt;
> &gt; &amp;lt;br /&amp;gt;&amp;lt;b&amp;gt;Fatal error&amp;lt;/ 
> b&amp;gt;:
> Uncaught exception
> &gt; 'Exception' with message 'Invalid request JSON' in
> /Library/
> &gt; WebServer/Documents/shindig/php/src/socialdata/http/
> &gt; GadgetDataServlet.php:80Stack trace:#0 /Library/WebServer/ 
> Documents/
> &gt; shindig/php/index.php(86): GadgetDataServlet- 
> &amp;amp;gt;doPost()#1
> &gt; {main}  thrown in
> &amp;lt;b&amp;gt;/Library/WebServer/Documents/shindig/php/
> &gt; src/socialdata/http/GadgetDataServlet.php&amp;lt;/b&amp;gt; on  
> line
> &amp;lt;b&amp;gt;
> &gt; 80&amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;
> &gt;
> &gt; It seems it did make request to the servlet.
> &gt;
> &gt; What is the problem here?
> &gt;
> &gt; Thanks
> &gt;
> &gt; --- On Fri, 6/6/08, Ram Sharma  
> &amp;lt;ramsharma2k5@gmail.com&amp;gt;
> wrote:
> &gt; From: Ram Sharma &amp;lt;ramsharma2k5@gmail.com&amp;gt;
> &gt; Subject: Re: open social sample container error on php shindig  
> server
> &gt; To: shindig-dev@incubator.apache.org
> &gt; Date: Friday, June 6, 2008, 6:21 AM
> &gt;
> &gt; So, We should have a comment in SampleContainer.html code for PHP
> &gt; Shindig
> &gt; users that Please change /social/rest to /social/data/ till we  
> have
> &gt; RESTful
> &gt; api support in PHP Shindig.
> &gt;
> &gt; On Fri, Jun 6, 2008 at 4:45 PM, Chris Chabot
> &gt; &amp;lt;chabotc@xs4all.nl&amp;gt; wrote:
> &gt;
> &gt; &amp;gt; I guess the sample container assumes your using the  
> RESTful
> &gt; api, which
> &gt; &amp;gt; doesn't exist yet in the PHP version.
> &gt; &amp;gt;
> &gt; &amp;gt; On Fri, 2008-06-06 at 15:08 +0530, Ram Sharma wrote:
> &gt; &amp;gt; &amp;gt; Hi Chirs,
> &gt; &amp;gt; &amp;gt;
> &gt; &amp;gt; &amp;gt; I wrote that as a bug because in  
> samplecontiner.html
> &gt; contains the
> &gt; code
> &gt; &amp;gt; &amp;gt;
> &gt; &amp;gt; &amp;gt; var socialDataPath =  
> document.location.protocol +
> "//" +
> &gt; &amp;gt; &amp;gt; document.location.host
> &gt; &amp;gt; &amp;gt;     + "/social/data/samplecontainer/";
> &gt; &amp;gt; &amp;gt;
> &gt; &amp;gt; &amp;gt; so it will try to find  '/social/data/'  and
> throws error
> &gt; &amp;gt; &amp;gt;
> &gt; &amp;gt; &amp;gt; that's why had have that change in URL mapping.
> &gt; &amp;gt; &amp;gt;
> &gt; &amp;gt; &amp;gt; - Ram
> &gt; &amp;gt; &amp;gt;
> &gt; &amp;gt; &amp;gt; On Fri, Jun 6, 2008 at 3:04 PM, Ram Sharma
> &gt; &amp;lt;ramsharma2k5@gmail.com&amp;gt;
> &gt; &amp;gt; wrote:
> &gt; &amp;gt; &amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt; Hi Chris,
> &gt; &amp;gt; &amp;gt; &amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt; That might be the case, But if don't  
> change
> the
> &gt; mapping then
> &gt; sample
> &gt; &amp;gt; &amp;gt; &amp;gt; container doesn't work like Xin has  
> asked.
> Wha to do
> &gt; in that
> &gt; case.
> &gt; &amp;gt; &amp;gt; &amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt; On Fri, Jun 6, 2008 at 2:14 PM,  
> Chris Chabot
> &gt; &amp;lt;chabotc@xs4all.nl&amp;gt;
> &gt; &amp;gt; wrote:
> &gt; &amp;gt; &amp;gt; &amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt; Hey Ram,
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt; Just to prevent potential  
> confusion...
> thats not
> &gt; a  bug.
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt; The PHP version of shindig  
> still uses
> the
> &gt; original JSON
> &gt; based wire
> &gt; &amp;gt; format
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt; which lives under /social/ 
> data. We are
> working on
> &gt; making the
> &gt; RESTful
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt; interface too, and once  
> that's done
> that will
> &gt; live under
> &gt; /social/rest.
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt; However just changing the  
> URL mapping
> of the JSON
> &gt; wire
> &gt; format handler,
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt; doesn't make it into a restful
> interface it will
> &gt; only
> &gt; break everything
> &gt; &amp;gt; :-)
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;        -- Chris
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt; On Jun 6, 2008, at 8:27 AM,  
> Ram Sharma
> wrote:
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;  Hi,
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; There is a bug left  
> in recent
> releases.
> &gt; Index.php has
> &gt; some
> &gt; &amp;gt; definitions
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; for
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; the incoming server  
> requests.
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; the code which is  
> there
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; $servletMap = array(
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
> Config::get('web_prefix') .
> &gt; '/gadgets/files'    =&amp;gt; 'FilesServlet',
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
> Config::get('web_prefix') .
> &gt; '/gadgets/js'       =&amp;gt; 'JsServlet',
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
> Config::get('web_prefix') .
> &gt; '/gadgets/proxy'    =&amp;gt; 'ProxyServlet',
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
> Config::get('web_prefix') .
> &gt; '/gadgets/ifr'      =&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
> 'GadgetRenderingServlet',
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
> Config::get('web_prefix') .
> &gt; '/gadgets/metadata' =&amp;gt; 'JsonRpcServlet',
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
> Config::get('web_prefix') .
> &gt; '/social/data'      =&amp;gt;
> &gt; &amp;gt; 'GadgetDataServlet',
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
> Config::get('web_prefix') .
> &gt; '/public.crt'       =&amp;gt; 'CertServlet'
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; );
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; you will have to  
> change
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
> Config::get('web_prefix') .
> &gt; '/social/data'      =&amp;gt;
> &gt; &amp;gt; 'GadgetDataServlet',
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; to
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
> Config::get('web_prefix') .
> &gt; '/social/rest'      =&amp;gt;
> &gt; &amp;gt; 'GadgetDataServlet',
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; I think it will work  
> for you.
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; - Ram Sharma
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;  Impetus Infotech  
> India Pvt Ltd
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; On Fri, Jun 6, 2008  
> at 12:07
> AM, xin zhang
> &gt; &amp;lt;xin_fun@yahoo.com&amp;gt;
> &gt; &amp;gt; wrote:
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;  Hi,
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; When I run  
> the open
> social sample container
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt;
> &gt;
> hhttp://localhost/shindig/php/gadgets/files/samplecontainer/samplecontainer.html
>
> &gt; ,
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; I got "The  
> request
> to the server caused an
> &gt; error" caused by
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; POST
> &gt; &amp;gt; http://localhost/shindig/php/social/rest/samplecontainer/setstate
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;  404
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; It is ok if  
> start java
> shindig server
> &gt; with mvn
> &gt; -Prun.
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; Can anyone  
> help me
> this?
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; Thanks
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; --
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; Ram Sharma
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; Software Engineer
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; Impetus Infotech  
> (India) Pvt
> Ltd
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; Indore
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt;
> &gt; &amp;gt; &amp;gt; &amp;gt; --
> &gt; &amp;gt; &amp;gt; &amp;gt; Ram Sharma
> &gt; &amp;gt; &amp;gt; &amp;gt; Software Engineer
> &gt; &amp;gt; &amp;gt; &amp;gt; Impetus Infotech (India) Pvt Ltd
> &gt; &amp;gt; &amp;gt; &amp;gt; Indore
> &gt; &amp;gt; &amp;gt; &amp;gt;
> &gt; &amp;gt; &amp;gt;
> &gt; &amp;gt; &amp;gt;
> &gt; &amp;gt; &amp;gt;
> &gt; &amp;gt;
> &gt; &amp;gt;
> &gt;
> &gt;
> &gt; --
> &gt; Ram Sharma
> &gt; Software Engineer
> &gt; Impetus Infotech (India) Pvt Ltd
> &gt; Indore
> &gt;
> &gt;
>
>


Re: open social sample container error on php shindig server

Posted by xin zhang <xi...@yahoo.com>.
No, I didn't use REST, I have /social/data in the url.

--- On Fri, 6/6/08, Chris Chabot &lt;chabotc@xs4all.nl&gt; wrote:
From: Chris Chabot &lt;chabotc@xs4all.nl&gt;
Subject: Re: open social sample container error on php shindig server
To: shindig-dev@incubator.apache.org
Date: Friday, June 6, 2008, 9:20 AM

I tried to tell you this earlier already: Just changing the URL does  
not change the protocol

/social/data talks 'JSON'
/social/rest -doesn't exist yet in php-

So just changing an URL doesn't make it speak another language (REST  
instead of JSON), and that's where your error comes from. Your doing a  
REST request to a JSON handler, putting a square in a circle so to  
speak.. it just don't work that way.

I think for now your better of sticking to the javascript/container/ 
sample*.html files, or check out partuza (http://code.google.com/p/partuza 
) if you need a sample container.

	-- Chris

On Jun 6, 2008, at 4:12 PM, xin zhang wrote:

&gt; ok, I changed the code in SampleContainer.html to
&gt; &amp;nbsp;
&gt; var socialDataPath = document.location.protocol + "//" +  
&gt; document.location.host
&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; +
"/shindig/php/social/data/samplecontainer/";
&gt;
&gt; But this time I got the following error:
&gt;
&gt; &amp;lt;br /&amp;gt;&amp;lt;b&amp;gt;Fatal error&amp;lt;/b&amp;gt;: 
Uncaught exception  
&gt; 'Exception' with message 'Invalid request JSON' in
/Library/ 
&gt; WebServer/Documents/shindig/php/src/socialdata/http/ 
&gt; GadgetDataServlet.php:80Stack trace:#0 /Library/WebServer/Documents/ 
&gt; shindig/php/index.php(86): GadgetDataServlet-&amp;amp;gt;doPost()#1  
&gt; {main}  thrown in
&amp;lt;b&amp;gt;/Library/WebServer/Documents/shindig/php/ 
&gt; src/socialdata/http/GadgetDataServlet.php&amp;lt;/b&amp;gt; on line
&amp;lt;b&amp;gt; 
&gt; 80&amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;
&gt;
&gt; It seems it did make request to the servlet.
&gt;
&gt; What is the problem here?
&gt;
&gt; Thanks
&gt;
&gt; --- On Fri, 6/6/08, Ram Sharma &amp;lt;ramsharma2k5@gmail.com&amp;gt;
wrote:
&gt; From: Ram Sharma &amp;lt;ramsharma2k5@gmail.com&amp;gt;
&gt; Subject: Re: open social sample container error on php shindig server
&gt; To: shindig-dev@incubator.apache.org
&gt; Date: Friday, June 6, 2008, 6:21 AM
&gt;
&gt; So, We should have a comment in SampleContainer.html code for PHP  
&gt; Shindig
&gt; users that Please change /social/rest to /social/data/ till we have  
&gt; RESTful
&gt; api support in PHP Shindig.
&gt;
&gt; On Fri, Jun 6, 2008 at 4:45 PM, Chris Chabot  
&gt; &amp;lt;chabotc@xs4all.nl&amp;gt; wrote:
&gt;
&gt; &amp;gt; I guess the sample container assumes your using the RESTful  
&gt; api, which
&gt; &amp;gt; doesn't exist yet in the PHP version.
&gt; &amp;gt;
&gt; &amp;gt; On Fri, 2008-06-06 at 15:08 +0530, Ram Sharma wrote:
&gt; &amp;gt; &amp;gt; Hi Chirs,
&gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt; I wrote that as a bug because in samplecontiner.html  
&gt; contains the
&gt; code
&gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt; var socialDataPath = document.location.protocol +
"//" +
&gt; &amp;gt; &amp;gt; document.location.host
&gt; &amp;gt; &amp;gt;     + "/social/data/samplecontainer/";
&gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt; so it will try to find  '/social/data/'  and
throws error
&gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt; that's why had have that change in URL mapping.
&gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt; - Ram
&gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt; On Fri, Jun 6, 2008 at 3:04 PM, Ram Sharma
&gt; &amp;lt;ramsharma2k5@gmail.com&amp;gt;
&gt; &amp;gt; wrote:
&gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt; Hi Chris,
&gt; &amp;gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt; That might be the case, But if don't change
the  
&gt; mapping then
&gt; sample
&gt; &amp;gt; &amp;gt; &amp;gt; container doesn't work like Xin has asked.
Wha to do  
&gt; in that
&gt; case.
&gt; &amp;gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt; On Fri, Jun 6, 2008 at 2:14 PM, Chris Chabot
&gt; &amp;lt;chabotc@xs4all.nl&amp;gt;
&gt; &amp;gt; wrote:
&gt; &amp;gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt; Hey Ram,
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt; Just to prevent potential confusion...
thats not  
&gt; a  bug.
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt; The PHP version of shindig still uses
the  
&gt; original JSON
&gt; based wire
&gt; &amp;gt; format
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt; which lives under /social/data. We are
working on  
&gt; making the
&gt; RESTful
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt; interface too, and once that's done
that will  
&gt; live under
&gt; /social/rest.
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt; However just changing the URL mapping
of the JSON  
&gt; wire
&gt; format handler,
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt; doesn't make it into a restful
interface it will  
&gt; only
&gt; break everything
&gt; &amp;gt; :-)
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;        -- Chris
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt; On Jun 6, 2008, at 8:27 AM, Ram Sharma
wrote:
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;  Hi,
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; There is a bug left in recent
releases.  
&gt; Index.php has
&gt; some
&gt; &amp;gt; definitions
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; for
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; the incoming server requests.
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; the code which is there
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; $servletMap = array(
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
Config::get('web_prefix') .
&gt; '/gadgets/files'    =&amp;gt; 'FilesServlet',
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
Config::get('web_prefix') .
&gt; '/gadgets/js'       =&amp;gt; 'JsServlet',
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
Config::get('web_prefix') .
&gt; '/gadgets/proxy'    =&amp;gt; 'ProxyServlet',
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
Config::get('web_prefix') .
&gt; '/gadgets/ifr'      =&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
'GadgetRenderingServlet',
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
Config::get('web_prefix') .
&gt; '/gadgets/metadata' =&amp;gt; 'JsonRpcServlet',
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
Config::get('web_prefix') .
&gt; '/social/data'      =&amp;gt;
&gt; &amp;gt; 'GadgetDataServlet',
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
Config::get('web_prefix') .
&gt; '/public.crt'       =&amp;gt; 'CertServlet'
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; );
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; you will have to change
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
Config::get('web_prefix') .
&gt; '/social/data'      =&amp;gt;
&gt; &amp;gt; 'GadgetDataServlet',
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; to
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
Config::get('web_prefix') .
&gt; '/social/rest'      =&amp;gt;
&gt; &amp;gt; 'GadgetDataServlet',
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; I think it will work for you.
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; - Ram Sharma
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;  Impetus Infotech India Pvt Ltd
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; On Fri, Jun 6, 2008 at 12:07
AM, xin zhang
&gt; &amp;lt;xin_fun@yahoo.com&amp;gt;
&gt; &amp;gt; wrote:
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;  Hi,
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; When I run the open
social sample container
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt;
&gt;
hhttp://localhost/shindig/php/gadgets/files/samplecontainer/samplecontainer.html

&gt; ,
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; I got "The request
to the server caused an
&gt; error" caused by
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; POST
&gt; &amp;gt; http://localhost/shindig/php/social/rest/samplecontainer/setstate
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;  404
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; It is ok if start java
shindig server  
&gt; with mvn
&gt; -Prun.
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; Can anyone help me
this?
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; Thanks
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; --
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; Ram Sharma
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; Software Engineer
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; Impetus Infotech (India) Pvt
Ltd
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt; Indore
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt; &amp;gt; --
&gt; &amp;gt; &amp;gt; &amp;gt; Ram Sharma
&gt; &amp;gt; &amp;gt; &amp;gt; Software Engineer
&gt; &amp;gt; &amp;gt; &amp;gt; Impetus Infotech (India) Pvt Ltd
&gt; &amp;gt; &amp;gt; &amp;gt; Indore
&gt; &amp;gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt;
&gt; &amp;gt;
&gt; &amp;gt;
&gt;
&gt;
&gt; -- 
&gt; Ram Sharma
&gt; Software Engineer
&gt; Impetus Infotech (India) Pvt Ltd
&gt; Indore
&gt;
&gt;


      

Re: open social sample container error on php shindig server

Posted by Chris Chabot <ch...@xs4all.nl>.
I tried to tell you this earlier already: Just changing the URL does  
not change the protocol

/social/data talks 'JSON'
/social/rest -doesn't exist yet in php-

So just changing an URL doesn't make it speak another language (REST  
instead of JSON), and that's where your error comes from. Your doing a  
REST request to a JSON handler, putting a square in a circle so to  
speak.. it just don't work that way.

I think for now your better of sticking to the javascript/container/ 
sample*.html files, or check out partuza (http://code.google.com/p/partuza 
) if you need a sample container.

	-- Chris

On Jun 6, 2008, at 4:12 PM, xin zhang wrote:

> ok, I changed the code in SampleContainer.html to
> &nbsp;
> var socialDataPath = document.location.protocol + "//" +  
> document.location.host
> &nbsp;&nbsp;&nbsp; + "/shindig/php/social/data/samplecontainer/";
>
> But this time I got the following error:
>
> &lt;br /&gt;&lt;b&gt;Fatal error&lt;/b&gt;:  Uncaught exception  
> 'Exception' with message 'Invalid request JSON' in /Library/ 
> WebServer/Documents/shindig/php/src/socialdata/http/ 
> GadgetDataServlet.php:80Stack trace:#0 /Library/WebServer/Documents/ 
> shindig/php/index.php(86): GadgetDataServlet-&amp;gt;doPost()#1  
> {main}  thrown in &lt;b&gt;/Library/WebServer/Documents/shindig/php/ 
> src/socialdata/http/GadgetDataServlet.php&lt;/b&gt; on line &lt;b&gt; 
> 80&lt;/b&gt;&lt;br /&gt;
>
> It seems it did make request to the servlet.
>
> What is the problem here?
>
> Thanks
>
> --- On Fri, 6/6/08, Ram Sharma &lt;ramsharma2k5@gmail.com&gt; wrote:
> From: Ram Sharma &lt;ramsharma2k5@gmail.com&gt;
> Subject: Re: open social sample container error on php shindig server
> To: shindig-dev@incubator.apache.org
> Date: Friday, June 6, 2008, 6:21 AM
>
> So, We should have a comment in SampleContainer.html code for PHP  
> Shindig
> users that Please change /social/rest to /social/data/ till we have  
> RESTful
> api support in PHP Shindig.
>
> On Fri, Jun 6, 2008 at 4:45 PM, Chris Chabot  
> &lt;chabotc@xs4all.nl&gt; wrote:
>
> &gt; I guess the sample container assumes your using the RESTful  
> api, which
> &gt; doesn't exist yet in the PHP version.
> &gt;
> &gt; On Fri, 2008-06-06 at 15:08 +0530, Ram Sharma wrote:
> &gt; &gt; Hi Chirs,
> &gt; &gt;
> &gt; &gt; I wrote that as a bug because in samplecontiner.html  
> contains the
> code
> &gt; &gt;
> &gt; &gt; var socialDataPath = document.location.protocol + "//" +
> &gt; &gt; document.location.host
> &gt; &gt;     + "/social/data/samplecontainer/";
> &gt; &gt;
> &gt; &gt; so it will try to find  '/social/data/'  and throws error
> &gt; &gt;
> &gt; &gt; that's why had have that change in URL mapping.
> &gt; &gt;
> &gt; &gt; - Ram
> &gt; &gt;
> &gt; &gt; On Fri, Jun 6, 2008 at 3:04 PM, Ram Sharma
> &lt;ramsharma2k5@gmail.com&gt;
> &gt; wrote:
> &gt; &gt;
> &gt; &gt; &gt; Hi Chris,
> &gt; &gt; &gt;
> &gt; &gt; &gt; That might be the case, But if don't change the  
> mapping then
> sample
> &gt; &gt; &gt; container doesn't work like Xin has asked. Wha to do  
> in that
> case.
> &gt; &gt; &gt;
> &gt; &gt; &gt;
> &gt; &gt; &gt; On Fri, Jun 6, 2008 at 2:14 PM, Chris Chabot
> &lt;chabotc@xs4all.nl&gt;
> &gt; wrote:
> &gt; &gt; &gt;
> &gt; &gt; &gt;&gt; Hey Ram,
> &gt; &gt; &gt;&gt;
> &gt; &gt; &gt;&gt; Just to prevent potential confusion... thats not  
> a  bug.
> &gt; &gt; &gt;&gt;
> &gt; &gt; &gt;&gt; The PHP version of shindig still uses the  
> original JSON
> based wire
> &gt; format
> &gt; &gt; &gt;&gt; which lives under /social/data. We are working on  
> making the
> RESTful
> &gt; &gt; &gt;&gt; interface too, and once that's done that will  
> live under
> /social/rest.
> &gt; &gt; &gt;&gt;
> &gt; &gt; &gt;&gt; However just changing the URL mapping of the JSON  
> wire
> format handler,
> &gt; &gt; &gt;&gt; doesn't make it into a restful interface it will  
> only
> break everything
> &gt; :-)
> &gt; &gt; &gt;&gt;
> &gt; &gt; &gt;&gt;        -- Chris
> &gt; &gt; &gt;&gt;
> &gt; &gt; &gt;&gt;
> &gt; &gt; &gt;&gt; On Jun 6, 2008, at 8:27 AM, Ram Sharma wrote:
> &gt; &gt; &gt;&gt;
> &gt; &gt; &gt;&gt;  Hi,
> &gt; &gt; &gt;&gt;&gt; There is a bug left in recent releases.  
> Index.php has
> some
> &gt; definitions
> &gt; &gt; &gt;&gt;&gt; for
> &gt; &gt; &gt;&gt;&gt; the incoming server requests.
> &gt; &gt; &gt;&gt;&gt; the code which is there
> &gt; &gt; &gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt; $servletMap = array(
> &gt; &gt; &gt;&gt;&gt; Config::get('web_prefix') .
> '/gadgets/files'    =&gt; 'FilesServlet',
> &gt; &gt; &gt;&gt;&gt; Config::get('web_prefix') .
> '/gadgets/js'       =&gt; 'JsServlet',
> &gt; &gt; &gt;&gt;&gt; Config::get('web_prefix') .
> '/gadgets/proxy'    =&gt; 'ProxyServlet',
> &gt; &gt; &gt;&gt;&gt; Config::get('web_prefix') .
> '/gadgets/ifr'      =&gt;
> &gt; &gt; &gt;&gt;&gt; 'GadgetRenderingServlet',
> &gt; &gt; &gt;&gt;&gt; Config::get('web_prefix') .
> '/gadgets/metadata' =&gt; 'JsonRpcServlet',
> &gt; &gt; &gt;&gt;&gt; Config::get('web_prefix') .
> '/social/data'      =&gt;
> &gt; 'GadgetDataServlet',
> &gt; &gt; &gt;&gt;&gt; Config::get('web_prefix') .
> '/public.crt'       =&gt; 'CertServlet'
> &gt; &gt; &gt;&gt;&gt; );
> &gt; &gt; &gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt; you will have to change
> &gt; &gt; &gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt; Config::get('web_prefix') .
> '/social/data'      =&gt;
> &gt; 'GadgetDataServlet',
> &gt; &gt; &gt;&gt;&gt; to
> &gt; &gt; &gt;&gt;&gt; Config::get('web_prefix') .
> '/social/rest'      =&gt;
> &gt; 'GadgetDataServlet',
> &gt; &gt; &gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt; I think it will work for you.
> &gt; &gt; &gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt; - Ram Sharma
> &gt; &gt; &gt;&gt;&gt;  Impetus Infotech India Pvt Ltd
> &gt; &gt; &gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt; On Fri, Jun 6, 2008 at 12:07 AM, xin zhang
> &lt;xin_fun@yahoo.com&gt;
> &gt; wrote:
> &gt; &gt; &gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;  Hi,
> &gt; &gt; &gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt; When I run the open social sample container
> &gt; &gt; &gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;
> &gt;
> hhttp://localhost/shindig/php/gadgets/files/samplecontainer/samplecontainer.html 
> ,
> &gt; &gt; &gt;&gt;&gt;&gt; I got "The request to the server caused an
> error" caused by
> &gt; &gt; &gt;&gt;&gt;&gt; POST
> &gt; http://localhost/shindig/php/social/rest/samplecontainer/setstate
> &gt; &gt; &gt;&gt;&gt;&gt;  404
> &gt; &gt; &gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt; It is ok if start java shindig server  
> with mvn
> -Prun.
> &gt; &gt; &gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt; Can anyone help me this?
> &gt; &gt; &gt;&gt;&gt;&gt; Thanks
> &gt; &gt; &gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt;
> &gt; &gt; &gt;&gt;&gt; --
> &gt; &gt; &gt;&gt;&gt; Ram Sharma
> &gt; &gt; &gt;&gt;&gt; Software Engineer
> &gt; &gt; &gt;&gt;&gt; Impetus Infotech (India) Pvt Ltd
> &gt; &gt; &gt;&gt;&gt; Indore
> &gt; &gt; &gt;&gt;&gt;
> &gt; &gt; &gt;&gt;
> &gt; &gt; &gt;&gt;
> &gt; &gt; &gt;
> &gt; &gt; &gt;
> &gt; &gt; &gt; --
> &gt; &gt; &gt; Ram Sharma
> &gt; &gt; &gt; Software Engineer
> &gt; &gt; &gt; Impetus Infotech (India) Pvt Ltd
> &gt; &gt; &gt; Indore
> &gt; &gt; &gt;
> &gt; &gt;
> &gt; &gt;
> &gt; &gt;
> &gt;
> &gt;
>
>
> -- 
> Ram Sharma
> Software Engineer
> Impetus Infotech (India) Pvt Ltd
> Indore
>
>


Re: open social sample container error on php shindig server

Posted by xin zhang <xi...@yahoo.com>.
ok, I changed the code in SampleContainer.html to
&nbsp;
var socialDataPath = document.location.protocol + "//" + document.location.host
&nbsp;&nbsp;&nbsp; + "/shindig/php/social/data/samplecontainer/";

But this time I got the following error:

&lt;br /&gt;&lt;b&gt;Fatal error&lt;/b&gt;:  Uncaught exception 'Exception' with message 'Invalid request JSON' in /Library/WebServer/Documents/shindig/php/src/socialdata/http/GadgetDataServlet.php:80Stack trace:#0 /Library/WebServer/Documents/shindig/php/index.php(86): GadgetDataServlet-&amp;gt;doPost()#1 {main}  thrown in &lt;b&gt;/Library/WebServer/Documents/shindig/php/src/socialdata/http/GadgetDataServlet.php&lt;/b&gt; on line &lt;b&gt;80&lt;/b&gt;&lt;br /&gt;

It seems it did make request to the servlet.

What is the problem here?

Thanks

--- On Fri, 6/6/08, Ram Sharma &lt;ramsharma2k5@gmail.com&gt; wrote:
From: Ram Sharma &lt;ramsharma2k5@gmail.com&gt;
Subject: Re: open social sample container error on php shindig server
To: shindig-dev@incubator.apache.org
Date: Friday, June 6, 2008, 6:21 AM

So, We should have a comment in SampleContainer.html code for PHP Shindig
users that Please change /social/rest to /social/data/ till we have RESTful
api support in PHP Shindig.

On Fri, Jun 6, 2008 at 4:45 PM, Chris Chabot &lt;chabotc@xs4all.nl&gt; wrote:

&gt; I guess the sample container assumes your using the RESTful api, which
&gt; doesn't exist yet in the PHP version.
&gt;
&gt; On Fri, 2008-06-06 at 15:08 +0530, Ram Sharma wrote:
&gt; &gt; Hi Chirs,
&gt; &gt;
&gt; &gt; I wrote that as a bug because in samplecontiner.html contains the
code
&gt; &gt;
&gt; &gt; var socialDataPath = document.location.protocol + "//" +
&gt; &gt; document.location.host
&gt; &gt;     + "/social/data/samplecontainer/";
&gt; &gt;
&gt; &gt; so it will try to find  '/social/data/'  and throws error
&gt; &gt;
&gt; &gt; that's why had have that change in URL mapping.
&gt; &gt;
&gt; &gt; - Ram
&gt; &gt;
&gt; &gt; On Fri, Jun 6, 2008 at 3:04 PM, Ram Sharma
&lt;ramsharma2k5@gmail.com&gt;
&gt; wrote:
&gt; &gt;
&gt; &gt; &gt; Hi Chris,
&gt; &gt; &gt;
&gt; &gt; &gt; That might be the case, But if don't change the mapping then
sample
&gt; &gt; &gt; container doesn't work like Xin has asked. Wha to do in that
case.
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt; &gt; On Fri, Jun 6, 2008 at 2:14 PM, Chris Chabot
&lt;chabotc@xs4all.nl&gt;
&gt; wrote:
&gt; &gt; &gt;
&gt; &gt; &gt;&gt; Hey Ram,
&gt; &gt; &gt;&gt;
&gt; &gt; &gt;&gt; Just to prevent potential confusion... thats not a  bug.
&gt; &gt; &gt;&gt;
&gt; &gt; &gt;&gt; The PHP version of shindig still uses the original JSON
based wire
&gt; format
&gt; &gt; &gt;&gt; which lives under /social/data. We are working on making the
RESTful
&gt; &gt; &gt;&gt; interface too, and once that's done that will live under
/social/rest.
&gt; &gt; &gt;&gt;
&gt; &gt; &gt;&gt; However just changing the URL mapping of the JSON wire
format handler,
&gt; &gt; &gt;&gt; doesn't make it into a restful interface it will only
break everything
&gt; :-)
&gt; &gt; &gt;&gt;
&gt; &gt; &gt;&gt;        -- Chris
&gt; &gt; &gt;&gt;
&gt; &gt; &gt;&gt;
&gt; &gt; &gt;&gt; On Jun 6, 2008, at 8:27 AM, Ram Sharma wrote:
&gt; &gt; &gt;&gt;
&gt; &gt; &gt;&gt;  Hi,
&gt; &gt; &gt;&gt;&gt; There is a bug left in recent releases. Index.php has
some
&gt; definitions
&gt; &gt; &gt;&gt;&gt; for
&gt; &gt; &gt;&gt;&gt; the incoming server requests.
&gt; &gt; &gt;&gt;&gt; the code which is there
&gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt; $servletMap = array(
&gt; &gt; &gt;&gt;&gt; Config::get('web_prefix') .
'/gadgets/files'    =&gt; 'FilesServlet',
&gt; &gt; &gt;&gt;&gt; Config::get('web_prefix') .
'/gadgets/js'       =&gt; 'JsServlet',
&gt; &gt; &gt;&gt;&gt; Config::get('web_prefix') .
'/gadgets/proxy'    =&gt; 'ProxyServlet',
&gt; &gt; &gt;&gt;&gt; Config::get('web_prefix') .
'/gadgets/ifr'      =&gt;
&gt; &gt; &gt;&gt;&gt; 'GadgetRenderingServlet',
&gt; &gt; &gt;&gt;&gt; Config::get('web_prefix') .
'/gadgets/metadata' =&gt; 'JsonRpcServlet',
&gt; &gt; &gt;&gt;&gt; Config::get('web_prefix') .
'/social/data'      =&gt;
&gt; 'GadgetDataServlet',
&gt; &gt; &gt;&gt;&gt; Config::get('web_prefix') .
'/public.crt'       =&gt; 'CertServlet'
&gt; &gt; &gt;&gt;&gt; );
&gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt; you will have to change
&gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt; Config::get('web_prefix') .
'/social/data'      =&gt;
&gt; 'GadgetDataServlet',
&gt; &gt; &gt;&gt;&gt; to
&gt; &gt; &gt;&gt;&gt; Config::get('web_prefix') .
'/social/rest'      =&gt;
&gt; 'GadgetDataServlet',
&gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt; I think it will work for you.
&gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt; - Ram Sharma
&gt; &gt; &gt;&gt;&gt;  Impetus Infotech India Pvt Ltd
&gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt; On Fri, Jun 6, 2008 at 12:07 AM, xin zhang
&lt;xin_fun@yahoo.com&gt;
&gt; wrote:
&gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt;  Hi,
&gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt;&gt; When I run the open social sample container
&gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt;&gt;
&gt;
hhttp://localhost/shindig/php/gadgets/files/samplecontainer/samplecontainer.html,
&gt; &gt; &gt;&gt;&gt;&gt; I got "The request to the server caused an
error" caused by
&gt; &gt; &gt;&gt;&gt;&gt; POST
&gt; http://localhost/shindig/php/social/rest/samplecontainer/setstate
&gt; &gt; &gt;&gt;&gt;&gt;  404
&gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt;&gt; It is ok if start java shindig server with mvn
-Prun.
&gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt;&gt; Can anyone help me this?
&gt; &gt; &gt;&gt;&gt;&gt; Thanks
&gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt; --
&gt; &gt; &gt;&gt;&gt; Ram Sharma
&gt; &gt; &gt;&gt;&gt; Software Engineer
&gt; &gt; &gt;&gt;&gt; Impetus Infotech (India) Pvt Ltd
&gt; &gt; &gt;&gt;&gt; Indore
&gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt;&gt;
&gt; &gt; &gt;&gt;
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt; &gt; --
&gt; &gt; &gt; Ram Sharma
&gt; &gt; &gt; Software Engineer
&gt; &gt; &gt; Impetus Infotech (India) Pvt Ltd
&gt; &gt; &gt; Indore
&gt; &gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt;
&gt;


-- 
Ram Sharma
Software Engineer
Impetus Infotech (India) Pvt Ltd
Indore


      

Re: open social sample container error on php shindig server

Posted by Ram Sharma <ra...@gmail.com>.
So, We should have a comment in SampleContainer.html code for PHP Shindig
users that Please change /social/rest to /social/data/ till we have RESTful
api support in PHP Shindig.

On Fri, Jun 6, 2008 at 4:45 PM, Chris Chabot <ch...@xs4all.nl> wrote:

> I guess the sample container assumes your using the RESTful api, which
> doesn't exist yet in the PHP version.
>
> On Fri, 2008-06-06 at 15:08 +0530, Ram Sharma wrote:
> > Hi Chirs,
> >
> > I wrote that as a bug because in samplecontiner.html contains the code
> >
> > var socialDataPath = document.location.protocol + "//" +
> > document.location.host
> >     + "/social/data/samplecontainer/";
> >
> > so it will try to find  '/social/data/'  and throws error
> >
> > that's why had have that change in URL mapping.
> >
> > - Ram
> >
> > On Fri, Jun 6, 2008 at 3:04 PM, Ram Sharma <ra...@gmail.com>
> wrote:
> >
> > > Hi Chris,
> > >
> > > That might be the case, But if don't change the mapping then sample
> > > container doesn't work like Xin has asked. Wha to do in that case.
> > >
> > >
> > > On Fri, Jun 6, 2008 at 2:14 PM, Chris Chabot <ch...@xs4all.nl>
> wrote:
> > >
> > >> Hey Ram,
> > >>
> > >> Just to prevent potential confusion... thats not a  bug.
> > >>
> > >> The PHP version of shindig still uses the original JSON based wire
> format
> > >> which lives under /social/data. We are working on making the RESTful
> > >> interface too, and once that's done that will live under /social/rest.
> > >>
> > >> However just changing the URL mapping of the JSON wire format handler,
> > >> doesn't make it into a restful interface it will only break everything
> :-)
> > >>
> > >>        -- Chris
> > >>
> > >>
> > >> On Jun 6, 2008, at 8:27 AM, Ram Sharma wrote:
> > >>
> > >>  Hi,
> > >>> There is a bug left in recent releases. Index.php has some
> definitions
> > >>> for
> > >>> the incoming server requests.
> > >>> the code which is there
> > >>>
> > >>> $servletMap = array(
> > >>> Config::get('web_prefix') . '/gadgets/files'    => 'FilesServlet',
> > >>> Config::get('web_prefix') . '/gadgets/js'       => 'JsServlet',
> > >>> Config::get('web_prefix') . '/gadgets/proxy'    => 'ProxyServlet',
> > >>> Config::get('web_prefix') . '/gadgets/ifr'      =>
> > >>> 'GadgetRenderingServlet',
> > >>> Config::get('web_prefix') . '/gadgets/metadata' => 'JsonRpcServlet',
> > >>> Config::get('web_prefix') . '/social/data'      =>
> 'GadgetDataServlet',
> > >>> Config::get('web_prefix') . '/public.crt'       => 'CertServlet'
> > >>> );
> > >>>
> > >>> you will have to change
> > >>>
> > >>> Config::get('web_prefix') . '/social/data'      =>
> 'GadgetDataServlet',
> > >>> to
> > >>> Config::get('web_prefix') . '/social/rest'      =>
> 'GadgetDataServlet',
> > >>>
> > >>> I think it will work for you.
> > >>>
> > >>> - Ram Sharma
> > >>>  Impetus Infotech India Pvt Ltd
> > >>>
> > >>>
> > >>> On Fri, Jun 6, 2008 at 12:07 AM, xin zhang <xi...@yahoo.com>
> wrote:
> > >>>
> > >>>  Hi,
> > >>>>
> > >>>> When I run the open social sample container
> > >>>>
> > >>>>
> hhttp://localhost/shindig/php/gadgets/files/samplecontainer/samplecontainer.html,
> > >>>> I got "The request to the server caused an error" caused by
> > >>>> POST
> http://localhost/shindig/php/social/rest/samplecontainer/setstate
> > >>>>  404
> > >>>>
> > >>>> It is ok if start java shindig server with mvn -Prun.
> > >>>>
> > >>>> Can anyone help me this?
> > >>>> Thanks
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>
> > >>> --
> > >>> Ram Sharma
> > >>> Software Engineer
> > >>> Impetus Infotech (India) Pvt Ltd
> > >>> Indore
> > >>>
> > >>
> > >>
> > >
> > >
> > > --
> > > Ram Sharma
> > > Software Engineer
> > > Impetus Infotech (India) Pvt Ltd
> > > Indore
> > >
> >
> >
> >
>
>


-- 
Ram Sharma
Software Engineer
Impetus Infotech (India) Pvt Ltd
Indore

Re: open social sample container error on php shindig server

Posted by Chris Chabot <ch...@xs4all.nl>.
I guess the sample container assumes your using the RESTful api, which
doesn't exist yet in the PHP version. 

On Fri, 2008-06-06 at 15:08 +0530, Ram Sharma wrote:
> Hi Chirs,
> 
> I wrote that as a bug because in samplecontiner.html contains the code
> 
> var socialDataPath = document.location.protocol + "//" +
> document.location.host
>     + "/social/data/samplecontainer/";
> 
> so it will try to find  '/social/data/'  and throws error
> 
> that's why had have that change in URL mapping.
> 
> - Ram
> 
> On Fri, Jun 6, 2008 at 3:04 PM, Ram Sharma <ra...@gmail.com> wrote:
> 
> > Hi Chris,
> >
> > That might be the case, But if don't change the mapping then sample
> > container doesn't work like Xin has asked. Wha to do in that case.
> >
> >
> > On Fri, Jun 6, 2008 at 2:14 PM, Chris Chabot <ch...@xs4all.nl> wrote:
> >
> >> Hey Ram,
> >>
> >> Just to prevent potential confusion... thats not a  bug.
> >>
> >> The PHP version of shindig still uses the original JSON based wire format
> >> which lives under /social/data. We are working on making the RESTful
> >> interface too, and once that's done that will live under /social/rest.
> >>
> >> However just changing the URL mapping of the JSON wire format handler,
> >> doesn't make it into a restful interface it will only break everything :-)
> >>
> >>        -- Chris
> >>
> >>
> >> On Jun 6, 2008, at 8:27 AM, Ram Sharma wrote:
> >>
> >>  Hi,
> >>> There is a bug left in recent releases. Index.php has some definitions
> >>> for
> >>> the incoming server requests.
> >>> the code which is there
> >>>
> >>> $servletMap = array(
> >>> Config::get('web_prefix') . '/gadgets/files'    => 'FilesServlet',
> >>> Config::get('web_prefix') . '/gadgets/js'       => 'JsServlet',
> >>> Config::get('web_prefix') . '/gadgets/proxy'    => 'ProxyServlet',
> >>> Config::get('web_prefix') . '/gadgets/ifr'      =>
> >>> 'GadgetRenderingServlet',
> >>> Config::get('web_prefix') . '/gadgets/metadata' => 'JsonRpcServlet',
> >>> Config::get('web_prefix') . '/social/data'      => 'GadgetDataServlet',
> >>> Config::get('web_prefix') . '/public.crt'       => 'CertServlet'
> >>> );
> >>>
> >>> you will have to change
> >>>
> >>> Config::get('web_prefix') . '/social/data'      => 'GadgetDataServlet',
> >>> to
> >>> Config::get('web_prefix') . '/social/rest'      => 'GadgetDataServlet',
> >>>
> >>> I think it will work for you.
> >>>
> >>> - Ram Sharma
> >>>  Impetus Infotech India Pvt Ltd
> >>>
> >>>
> >>> On Fri, Jun 6, 2008 at 12:07 AM, xin zhang <xi...@yahoo.com> wrote:
> >>>
> >>>  Hi,
> >>>>
> >>>> When I run the open social sample container
> >>>>
> >>>> hhttp://localhost/shindig/php/gadgets/files/samplecontainer/samplecontainer.html,
> >>>> I got "The request to the server caused an error" caused by
> >>>> POST http://localhost/shindig/php/social/rest/samplecontainer/setstate
> >>>>  404
> >>>>
> >>>> It is ok if start java shindig server with mvn -Prun.
> >>>>
> >>>> Can anyone help me this?
> >>>> Thanks
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>> --
> >>> Ram Sharma
> >>> Software Engineer
> >>> Impetus Infotech (India) Pvt Ltd
> >>> Indore
> >>>
> >>
> >>
> >
> >
> > --
> > Ram Sharma
> > Software Engineer
> > Impetus Infotech (India) Pvt Ltd
> > Indore
> >
> 
> 
> 


Re: open social sample container error on php shindig server

Posted by Ram Sharma <ra...@gmail.com>.
Sorry, Mistyped in previous mail it

/social/rest/ there in the samplecontainer.html

On Fri, Jun 6, 2008 at 3:08 PM, Ram Sharma <ra...@gmail.com> wrote:

> Hi Chirs,
>
> I wrote that as a bug because in samplecontiner.html contains the code
>
> var socialDataPath = document.location.protocol + "//" +
> document.location.host
>     + "/social/data/samplecontainer/";
>
> so it will try to find  '/social/data/'  and throws error
>
> that's why had have that change in URL mapping.
>
> - Ram
>
>
> On Fri, Jun 6, 2008 at 3:04 PM, Ram Sharma <ra...@gmail.com> wrote:
>
>> Hi Chris,
>>
>> That might be the case, But if don't change the mapping then sample
>> container doesn't work like Xin has asked. Wha to do in that case.
>>
>>
>> On Fri, Jun 6, 2008 at 2:14 PM, Chris Chabot <ch...@xs4all.nl> wrote:
>>
>>> Hey Ram,
>>>
>>> Just to prevent potential confusion... thats not a  bug.
>>>
>>> The PHP version of shindig still uses the original JSON based wire format
>>> which lives under /social/data. We are working on making the RESTful
>>> interface too, and once that's done that will live under /social/rest.
>>>
>>> However just changing the URL mapping of the JSON wire format handler,
>>> doesn't make it into a restful interface it will only break everything :-)
>>>
>>>        -- Chris
>>>
>>>
>>> On Jun 6, 2008, at 8:27 AM, Ram Sharma wrote:
>>>
>>>  Hi,
>>>> There is a bug left in recent releases. Index.php has some definitions
>>>> for
>>>> the incoming server requests.
>>>> the code which is there
>>>>
>>>> $servletMap = array(
>>>> Config::get('web_prefix') . '/gadgets/files'    => 'FilesServlet',
>>>> Config::get('web_prefix') . '/gadgets/js'       => 'JsServlet',
>>>> Config::get('web_prefix') . '/gadgets/proxy'    => 'ProxyServlet',
>>>> Config::get('web_prefix') . '/gadgets/ifr'      =>
>>>> 'GadgetRenderingServlet',
>>>> Config::get('web_prefix') . '/gadgets/metadata' => 'JsonRpcServlet',
>>>> Config::get('web_prefix') . '/social/data'      => 'GadgetDataServlet',
>>>> Config::get('web_prefix') . '/public.crt'       => 'CertServlet'
>>>> );
>>>>
>>>> you will have to change
>>>>
>>>> Config::get('web_prefix') . '/social/data'      => 'GadgetDataServlet',
>>>> to
>>>> Config::get('web_prefix') . '/social/rest'      => 'GadgetDataServlet',
>>>>
>>>> I think it will work for you.
>>>>
>>>> - Ram Sharma
>>>>  Impetus Infotech India Pvt Ltd
>>>>
>>>>
>>>> On Fri, Jun 6, 2008 at 12:07 AM, xin zhang <xi...@yahoo.com> wrote:
>>>>
>>>>  Hi,
>>>>>
>>>>> When I run the open social sample container
>>>>>
>>>>> hhttp://localhost/shindig/php/gadgets/files/samplecontainer/samplecontainer.html,
>>>>> I got "The request to the server caused an error" caused by
>>>>> POST http://localhost/shindig/php/social/rest/samplecontainer/setstate
>>>>>  404
>>>>>
>>>>> It is ok if start java shindig server with mvn -Prun.
>>>>>
>>>>> Can anyone help me this?
>>>>> Thanks
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> Ram Sharma
>>>> Software Engineer
>>>> Impetus Infotech (India) Pvt Ltd
>>>> Indore
>>>>
>>>
>>>
>>
>>
>> --
>> Ram Sharma
>> Software Engineer
>> Impetus Infotech (India) Pvt Ltd
>> Indore
>>
>
>
>
> --
> Ram Sharma
> Software Engineer
> Impetus Infotech (India) Pvt Ltd
> Indore
>



-- 
Ram Sharma
Software Engineer
Impetus Infotech (India) Pvt Ltd
Indore

Re: open social sample container error on php shindig server

Posted by Ram Sharma <ra...@gmail.com>.
Hi Chirs,

I wrote that as a bug because in samplecontiner.html contains the code

var socialDataPath = document.location.protocol + "//" +
document.location.host
    + "/social/data/samplecontainer/";

so it will try to find  '/social/data/'  and throws error

that's why had have that change in URL mapping.

- Ram

On Fri, Jun 6, 2008 at 3:04 PM, Ram Sharma <ra...@gmail.com> wrote:

> Hi Chris,
>
> That might be the case, But if don't change the mapping then sample
> container doesn't work like Xin has asked. Wha to do in that case.
>
>
> On Fri, Jun 6, 2008 at 2:14 PM, Chris Chabot <ch...@xs4all.nl> wrote:
>
>> Hey Ram,
>>
>> Just to prevent potential confusion... thats not a  bug.
>>
>> The PHP version of shindig still uses the original JSON based wire format
>> which lives under /social/data. We are working on making the RESTful
>> interface too, and once that's done that will live under /social/rest.
>>
>> However just changing the URL mapping of the JSON wire format handler,
>> doesn't make it into a restful interface it will only break everything :-)
>>
>>        -- Chris
>>
>>
>> On Jun 6, 2008, at 8:27 AM, Ram Sharma wrote:
>>
>>  Hi,
>>> There is a bug left in recent releases. Index.php has some definitions
>>> for
>>> the incoming server requests.
>>> the code which is there
>>>
>>> $servletMap = array(
>>> Config::get('web_prefix') . '/gadgets/files'    => 'FilesServlet',
>>> Config::get('web_prefix') . '/gadgets/js'       => 'JsServlet',
>>> Config::get('web_prefix') . '/gadgets/proxy'    => 'ProxyServlet',
>>> Config::get('web_prefix') . '/gadgets/ifr'      =>
>>> 'GadgetRenderingServlet',
>>> Config::get('web_prefix') . '/gadgets/metadata' => 'JsonRpcServlet',
>>> Config::get('web_prefix') . '/social/data'      => 'GadgetDataServlet',
>>> Config::get('web_prefix') . '/public.crt'       => 'CertServlet'
>>> );
>>>
>>> you will have to change
>>>
>>> Config::get('web_prefix') . '/social/data'      => 'GadgetDataServlet',
>>> to
>>> Config::get('web_prefix') . '/social/rest'      => 'GadgetDataServlet',
>>>
>>> I think it will work for you.
>>>
>>> - Ram Sharma
>>>  Impetus Infotech India Pvt Ltd
>>>
>>>
>>> On Fri, Jun 6, 2008 at 12:07 AM, xin zhang <xi...@yahoo.com> wrote:
>>>
>>>  Hi,
>>>>
>>>> When I run the open social sample container
>>>>
>>>> hhttp://localhost/shindig/php/gadgets/files/samplecontainer/samplecontainer.html,
>>>> I got "The request to the server caused an error" caused by
>>>> POST http://localhost/shindig/php/social/rest/samplecontainer/setstate
>>>>  404
>>>>
>>>> It is ok if start java shindig server with mvn -Prun.
>>>>
>>>> Can anyone help me this?
>>>> Thanks
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> --
>>> Ram Sharma
>>> Software Engineer
>>> Impetus Infotech (India) Pvt Ltd
>>> Indore
>>>
>>
>>
>
>
> --
> Ram Sharma
> Software Engineer
> Impetus Infotech (India) Pvt Ltd
> Indore
>



-- 
Ram Sharma
Software Engineer
Impetus Infotech (India) Pvt Ltd
Indore

Re: open social sample container error on php shindig server

Posted by Ram Sharma <ra...@gmail.com>.
Hi Chris,

That might be the case, But if don't change the mapping then sample
container doesn't work like Xin has asked. Wha to do in that case.

On Fri, Jun 6, 2008 at 2:14 PM, Chris Chabot <ch...@xs4all.nl> wrote:

> Hey Ram,
>
> Just to prevent potential confusion... thats not a  bug.
>
> The PHP version of shindig still uses the original JSON based wire format
> which lives under /social/data. We are working on making the RESTful
> interface too, and once that's done that will live under /social/rest.
>
> However just changing the URL mapping of the JSON wire format handler,
> doesn't make it into a restful interface it will only break everything :-)
>
>        -- Chris
>
>
> On Jun 6, 2008, at 8:27 AM, Ram Sharma wrote:
>
>  Hi,
>> There is a bug left in recent releases. Index.php has some definitions for
>> the incoming server requests.
>> the code which is there
>>
>> $servletMap = array(
>> Config::get('web_prefix') . '/gadgets/files'    => 'FilesServlet',
>> Config::get('web_prefix') . '/gadgets/js'       => 'JsServlet',
>> Config::get('web_prefix') . '/gadgets/proxy'    => 'ProxyServlet',
>> Config::get('web_prefix') . '/gadgets/ifr'      =>
>> 'GadgetRenderingServlet',
>> Config::get('web_prefix') . '/gadgets/metadata' => 'JsonRpcServlet',
>> Config::get('web_prefix') . '/social/data'      => 'GadgetDataServlet',
>> Config::get('web_prefix') . '/public.crt'       => 'CertServlet'
>> );
>>
>> you will have to change
>>
>> Config::get('web_prefix') . '/social/data'      => 'GadgetDataServlet',
>> to
>> Config::get('web_prefix') . '/social/rest'      => 'GadgetDataServlet',
>>
>> I think it will work for you.
>>
>> - Ram Sharma
>>  Impetus Infotech India Pvt Ltd
>>
>>
>> On Fri, Jun 6, 2008 at 12:07 AM, xin zhang <xi...@yahoo.com> wrote:
>>
>>  Hi,
>>>
>>> When I run the open social sample container
>>>
>>> hhttp://localhost/shindig/php/gadgets/files/samplecontainer/samplecontainer.html,
>>> I got "The request to the server caused an error" caused by
>>> POST http://localhost/shindig/php/social/rest/samplecontainer/setstate
>>>  404
>>>
>>> It is ok if start java shindig server with mvn -Prun.
>>>
>>> Can anyone help me this?
>>> Thanks
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>> --
>> Ram Sharma
>> Software Engineer
>> Impetus Infotech (India) Pvt Ltd
>> Indore
>>
>
>


-- 
Ram Sharma
Software Engineer
Impetus Infotech (India) Pvt Ltd
Indore

Re: open social sample container error on php shindig server

Posted by Chris Chabot <ch...@xs4all.nl>.
Hey Ram,

Just to prevent potential confusion... thats not a  bug.

The PHP version of shindig still uses the original JSON based wire  
format which lives under /social/data. We are working on making the  
RESTful interface too, and once that's done that will live under / 
social/rest.

However just changing the URL mapping of the JSON wire format handler,  
doesn't make it into a restful interface it will only break  
everything :-)

	-- Chris

On Jun 6, 2008, at 8:27 AM, Ram Sharma wrote:

> Hi,
> There is a bug left in recent releases. Index.php has some  
> definitions for
> the incoming server requests.
> the code which is there
>
> $servletMap = array(
> Config::get('web_prefix') . '/gadgets/files'    => 'FilesServlet',
> Config::get('web_prefix') . '/gadgets/js'       => 'JsServlet',
> Config::get('web_prefix') . '/gadgets/proxy'    => 'ProxyServlet',
> Config::get('web_prefix') . '/gadgets/ifr'      =>
> 'GadgetRenderingServlet',
> Config::get('web_prefix') . '/gadgets/metadata' => 'JsonRpcServlet',
> Config::get('web_prefix') . '/social/data'      =>  
> 'GadgetDataServlet',
> Config::get('web_prefix') . '/public.crt'       => 'CertServlet'
> );
>
> you will have to change
>
> Config::get('web_prefix') . '/social/data'      =>  
> 'GadgetDataServlet',
> to
> Config::get('web_prefix') . '/social/rest'      =>  
> 'GadgetDataServlet',
>
> I think it will work for you.
>
> - Ram Sharma
>  Impetus Infotech India Pvt Ltd
>
>
> On Fri, Jun 6, 2008 at 12:07 AM, xin zhang <xi...@yahoo.com> wrote:
>
>> Hi,
>>
>> When I run the open social sample container
>> hhttp://localhost/shindig/php/gadgets/files/samplecontainer/samplecontainer.html 
>> ,
>> I got "The request to the server caused an error" caused by
>> POST http://localhost/shindig/php/social/rest/samplecontainer/setstate 
>>  404
>>
>> It is ok if start java shindig server with mvn -Prun.
>>
>> Can anyone help me this?
>> Thanks
>>
>>
>>
>>
>>
>>
>>
>>
>
>
> -- 
> Ram Sharma
> Software Engineer
> Impetus Infotech (India) Pvt Ltd
> Indore


Re: open social sample container error on php shindig server

Posted by Ram Sharma <ra...@gmail.com>.
Hi,
There is a bug left in recent releases. Index.php has some definitions for
the incoming server requests.
the code which is there

$servletMap = array(
 Config::get('web_prefix') . '/gadgets/files'    => 'FilesServlet',
 Config::get('web_prefix') . '/gadgets/js'       => 'JsServlet',
 Config::get('web_prefix') . '/gadgets/proxy'    => 'ProxyServlet',
 Config::get('web_prefix') . '/gadgets/ifr'      =>
'GadgetRenderingServlet',
 Config::get('web_prefix') . '/gadgets/metadata' => 'JsonRpcServlet',
 Config::get('web_prefix') . '/social/data'      => 'GadgetDataServlet',
 Config::get('web_prefix') . '/public.crt'       => 'CertServlet'
);

you will have to change

Config::get('web_prefix') . '/social/data'      => 'GadgetDataServlet',
to
 Config::get('web_prefix') . '/social/rest'      => 'GadgetDataServlet',

I think it will work for you.

- Ram Sharma
  Impetus Infotech India Pvt Ltd


On Fri, Jun 6, 2008 at 12:07 AM, xin zhang <xi...@yahoo.com> wrote:

> Hi,
>
> When I run the open social sample container
> hhttp://localhost/shindig/php/gadgets/files/samplecontainer/samplecontainer.html,
> I got "The request to the server caused an error" caused by
> POST http://localhost/shindig/php/social/rest/samplecontainer/setstate 404
>
> It is ok if start java shindig server with mvn -Prun.
>
> Can anyone help me this?
> Thanks
>
>
>
>
>
>
>
>


-- 
Ram Sharma
Software Engineer
Impetus Infotech (India) Pvt Ltd
Indore

Re: open social sample container error on php shindig server

Posted by Chris Chabot <ch...@xs4all.nl>.
Actually the PHP version of shindig doesn't do REST yet and it looks  
like either the sample container is hard wired to do rest based  
communication, or you changed the container.js useRestful to true?

I expect we'll have RESTful support done in the PHP version in the  
next week or 2 or 3, but for now you'll have to stick to the old json  
based wire format I'm afraid.

	-- Chris

On Jun 5, 2008, at 8:37 PM, xin zhang wrote:

> Hi,
>
> When I run the open social sample container hhttp://localhost/shindig/php/gadgets/files/samplecontainer/samplecontainer.html 
> , I got "The request to the server caused an error" caused by
> POST http://localhost/shindig/php/social/rest/samplecontainer/ 
> setstate 404
>
> It is ok if start java shindig server with mvn -Prun.
>
> Can anyone help me this?
> Thanks
>
>
>
>
>
>
>