cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Juffer <ajuf...@cc.oulu.fi>
Subject Re: using proxy from flowscript in Cocoon2.2
Date Mon, 16 Apr 2012 18:05:48 GMT
Well, I seem to be missing many things today. Hopefully somebody else 
has a answer to this problem.

Best,
André


On 04/16/2012 03:59 PM, Robby Pelssers wrote:
> Hi Andre,
>
> Looks like you missed my last email stating I already used JSONP as well
> in the past. But JSONP is only as good as it gets because “The trick is
> that the parameters are included as query parameters in the url, and the
> response is a JSON message wrapped in a callback function.” One of the
> reasons I sometimes use POST is because the querystring might be too
> large. JSONP suffers the same problem and is in my opinion only nice if
> you want to make a simple crossdomain GET request.
>
> So in reply on your proposals. I already considered
>
> -Plain AJAX call (does not work cross-domain)
>
> -JSONP (does work cross-domain but only supports using querystring)
>
> So that leaves me with creating some proxy service which brings me back
> to my original question ;-)
>
> Robby
>
> *From:*Andre Juffer [mailto:andre.juffer@oulu.fi]
> *Sent:* Monday, April 16, 2012 2:49 PM
> *To:* dev@cocoon.apache.org
> *Subject:* Re: using proxy from flowscript in Cocoon2.2
>
> On 04/16/2012 03:34 PM, Robby Pelssers wrote:
>
> Hi Andre,
>
> Thx for the link but I’m pretty confident with client side techniques
> actually. I’ve used AJAX a lot in the past using YUI and even blogged
> about this
> http://robbypelssers.blogspot.com/2010/11/yui-3-transaction-management-simplified.html.
> I’m equally familiar with JSONP but you might have missed the point that
> I need to do a cross-domain post or get?! YUI even offers some
> functionality using flash to make cross-domain requests but I don’t want
> go down that path to be honest.
>
>
> OK, another attempt:
>
> http://dojotoolkit.org/documentation/tutorials/1.7/jsonp/
>
> No flash required. Dojo does not require flash at all. Pure javascript
> and all very straightforward (at least in my opinion). There is some
> learning of course, but if you are not in a hurry, it is worthwhile to
> spent some time.
>
> Note: the link above and the previous refer to 'beginners' pages, but of
> course I did not think you are a beginner.
>
>
> Robby
>
> *From:*Andre Juffer [mailto:andre.juffer@oulu.fi]
> *Sent:* Monday, April 16, 2012 2:29 PM
> *To:* dev@cocoon.apache.org <mailto:dev@cocoon.apache.org>
> *Subject:* Re: using proxy from flowscript in Cocoon2.2
>
> Client-side:
>
> http://dojotoolkit.org/documentation/tutorials/1.7/ajax/
>
>
>
> On 04/16/2012 02:54 PM, Robby Pelssers wrote:
>
> Hi all,
>
> I have a use case where I need to post data to an Alfresco service which
> returns JSON response. Currently I just posted the page and showed the
> JSON data but ideally I want to stay on the same page and make an
> XMLhttpRequest from the client side. As this is crossdomain I need to
> setup a proxy service in flowscript but I can’t seem to find an easy way
> to accomplish this.
>
> Anyone who has a nice suggestion or some sample snippets laying around?
>
> Robby
>
>
>
>
>
> --
>
> Andre H. Juffer                            | Phone: +358-8-553 1161
>
> Biocenter Oulu and                      | Fax: +358-8-553-1141
>
> Department of Biochemistry      | Email:andre.juffer@oulu.fi  <mailto:andre.juffer@oulu.fi>
>
> University of Oulu, Finland    | WWW:www.biochem.oulu.fi/Biocomputing/  <http://www.biochem.oulu.fi/Biocomputing/>
>
> StrucBioCat                                    | WWW:www.strucbiocat.oulu.fi  <http://www.strucbiocat.oulu.fi>
>
> Triacle Biocomputing                  | WWW:www.triacle-bc.com  <http://www.triacle-bc.com>
>
>
>
>
> --
>
> Andre H. Juffer                            | Phone: +358-8-553 1161
>
> Biocenter Oulu and                      | Fax: +358-8-553-1141
>
> Department of Biochemistry      | Email:andre.juffer@oulu.fi  <mailto:andre.juffer@oulu.fi>
>
> University of Oulu, Finland    | WWW:www.biochem.oulu.fi/Biocomputing/  <http://www.biochem.oulu.fi/Biocomputing/>
>
> StrucBioCat                                    | WWW:www.strucbiocat.oulu.fi  <http://www.strucbiocat.oulu.fi>
>
> Triacle Biocomputing                  | WWW:www.triacle-bc.com  <http://www.triacle-bc.com>


-- 
Andre H. Juffer              | Phone: +358-8-553 1161
Biocenter Oulu and           | Fax: +358-8-553-1141
Department of Biochemistry   | Email: andre.juffer@oulu.fi
University of Oulu, Finland  | WWW: www.biochem.oulu.fi/Biocomputing/
StruBioCat                   | WWW: www.strubiocat.oulu.fi
Triacle Biocomputing         | WWW: www.triacle-bc.com

Mime
View raw message