The samplecontainer has actually been modified to send
application/javascript instead of a form urlencoded post.  Shouldn't this
content-type be supported?
~Arne


On Thu, Oct 22, 2009 at 3:14 AM, Chris Chabot <[email protected]> wrote:

> Hey Peter,
>
> The bad news is that the included samplecontainer is known to be somewhat
> buggy, it doesn't do quite a few of the things that a container should do
> and really doesn't make for the best example, in this particular case the
> error is because the spec states that only application/{xml,atom,json}
> post's are allowed but the sample container is doing a form encoded post
> instead
>
> The good news is that there is a much more feature complete demo / example
> called "Partuza", you can find a live version of it at
> http://www.partuza.nl
> and the code is located at http://code.google.com/p/partuza
>
> Using that much more of the functionality will be available, however it
> won't fix the shindigoauth.xml gadget right away since it looks like that's
> hard coded for the java version of shindig (looking at the source of the
> gadget xml you'll find a lot of localhost:8080/something references, which
> is the default out of the box example location of java shindig), also php
> shindig doesn't actually have the request/authorize/access token end
> points,
> instead it assumes that these are implemented by the container instead (as
> they almost always are on real social sites)
>
> If you wanted to do a real test of the oauth capabilities you're probably
> better of using a real oauth enabled service to authenticate against,
> partuza it's self supports (2 and 3 legged) oauth as well so you could even
> use that, the end points can be found at:
> http://www.chabotc.com/xrds-test.php?url=http://www.partuza.nl
>
> Hope that helps!
>
>   -- Chris
>
> On Thu, Oct 22, 2009 at 11:54 AM, Peter Clijsters <
> [email protected]> wrote:
>
> > Hi,
> >
> > Hope someone can point me in the right direction as this has cost me lots
> > of
> > time already..
> >
> > I'm using the latest PHP Shindig version from SVN. In the samplecontainer
> > that comes with Shindig, I'm trying the shindigoauth.xml gadget. The
> gadget
> > itself shows:
> >
> >    OAuth error: undefined: undefined
> >
> > This is a result for an error 500 returned from the makerequest URL.
> >
> > In the Apache error log, I see the following two messages:
> >
> > [Thu Oct 22 11:51:49 2009] [error] [client 192.87.117.239] PHP Fatal
> error:
> > Uncaught exception 'Exception' with message 'When posting to the social
> > end-point you have to specify a content type,\n              supported
> > content types are: 'application/json', 'application/xml' and
> > 'application/atom+xml'.\n              For content upload, content type
> can
> > be 'image/*', 'audio/*' and 'video/*'' in
> > /var/www/html/shindig/php/src/social/servlet/ApiServlet.php:86\nStack
> > trace:\n#0 /var/www/html/shindig/php/index.php(110):
> > ApiServlet->__construct()\n#1 {main}\n  thrown in
> > /var/www/html/shindig/php/src/social/servlet/ApiServlet.php on line 86,
> > referer:
> >
> >
> http://coin07.coin.surfnetlabs.nl/gadgets/files/samplecontainer/samplecontai
> > ner.html<
> http://coin07.coin.surfnetlabs.nl/gadgets/files/samplecontainer/samplecontai%0Aner.html
> >
> > [Thu Oct 22 11:51:50 2009] [error] [client 192.87.117.239] PHP Fatal
> error:
> > Call to a member function getUrl() on a non-object in
> > /var/www/html/shindig/php/src/gadgets/oauth/OAuthFetcher.php on line 177,
> > referer: http://coin07.coin.surfnetlabs.nl/gadgets/ifr?container=default
> > <
> >
> http://coin07.coin.surfnetlabs.nl/gadgets/ifr?container=default&mid=0&nocac
> >
> >
> he=1&country=ALL&lang=ALL&view=default&parent=http%3A%2F%2Fcoin07.coin.surfn
> >
> > etlabs.nl
> &st=john.doe%3Ajohn.doe%3A8741%3Ashindig%3Ahttp%253A//coin07.coin.s<
> http://coin07.coin.surfnetlabs.nl/gadgets/ifr?container=default&mid=0&nocac%0Ahe=1&country=ALL&lang=ALL&view=default&parent=http%3A%2F%2Fcoin07.coin.surfn%0Aetlabs.nl&st=john.doe%3Ajohn.doe%3A8741%3Ashindig%3Ahttp%253A//coin07.coin.s
> >
> >
> >
> urfnetlabs.nl/gadgets/files/samplecontainer/examples/shindigoauth.xml%3A0%3A
> >
> > default&url=http%3A%2F%2Fcoin07.coin.surfnetlabs.nl
> %2Fgadgets%2Ffiles%2Fsamp
> > lecontainer%2Fexamples%2Fshindigoauth.xml<
> http://urfnetlabs.nl/gadgets/files/samplecontainer/examples/shindigoauth.xml%3A0%3A%0Adefault&url=http%3A%2F%2Fcoin07.coin.surfnetlabs.nl%2Fgadgets%2Ffiles%2Fsamp%0Alecontainer%2Fexamples%2Fshindigoauth.xml
> >
> > >
> >
> >
> &mid=0&nocache=1&country=ALL&lang=ALL&view=default&parent=http%3A%2F%2Fcoin0
> > 7.coin.surfnetlabs.nl
> > &st=john.doe%3Ajohn.doe%3A8741%3Ashindig%3Ahttp%253A//c
> >
> >
> oin07.coin.surfnetlabs.nl/gadgets/files/samplecontainer/examples/shindigoaut
> >
> > h.xml%3A0%3Adefault&url=http%3A%2F%2Fcoin07.coin.surfnetlabs.nl
> %2Fgadgets%2F
> > files%2Fsamplecontainer%2Fexamples%2Fshindigoauth.xml<
> http://oin07.coin.surfnetlabs.nl/gadgets/files/samplecontainer/examples/shindigoaut%0Ah.xml%3A0%3Adefault&url=http%3A%2F%2Fcoin07.coin.surfnetlabs.nl%2Fgadgets%2F%0Afiles%2Fsamplecontainer%2Fexamples%2Fshindigoauth.xml
> >
> >
> >
> > The first message is logged I've seen before, even with running the
> default
> > gadget in the samplecontainer. The second is new and occurs also with the
> > other oauth example (oauth.xml).
> >
> > Any help would be greatly appreciated!
> >
> > Thanks,
> >
> > Peter
> >
> >
> >
>

Reply via email to