No, I didn't use REST, I have /social/data in the url.

--- On Fri, 6/6/08, Chris Chabot <[EMAIL PROTECTED]> wrote:
From: Chris Chabot <[EMAIL PROTECTED]>
Subject: Re: open social sample container error on php shindig server
To: [email protected]
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:

> ok, I changed the code in SampleContainer.html to
>  
> var socialDataPath = document.location.protocol + "//" +  
> document.location.host
>     +
"/shindig/php/social/data/samplecontainer/";
>
> But this time I got the following error:
>
> <br /><b>Fatal error</b>: 
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->doPost()#1  
> {main}  thrown in
<b>/Library/WebServer/Documents/shindig/php/ 
> src/socialdata/http/GadgetDataServlet.php</b> on line
<b> 
> 80</b><br />
>
> It seems it did make request to the servlet.
>
> What is the problem here?
>
> Thanks
>
> --- On Fri, 6/6/08, Ram Sharma <[EMAIL PROTECTED]>
wrote:
> From: Ram Sharma <[EMAIL PROTECTED]>
> Subject: Re: open social sample container error on php shindig server
> To: [email protected]
> 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  
> <[EMAIL PROTECTED]> 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
> <[EMAIL PROTECTED]>
> > 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
> <[EMAIL PROTECTED]>
> > 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
> <[EMAIL PROTECTED]>
> > 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
>
>


      

Reply via email to