[Seaside] Seaside URL and FLEX HTTPService
John McKeon
p3anoman at gmail.com
Sun Sep 28 19:41:45 UTC 2008
I would not claim to even have much knowledge of HTML :)
It appears that you are trying to make your seaside app a Flex service
or something like that. This would be a separate app that ANY page could
call and get an expected result. As such, the _s and _k parameters are
meaning less as they only pertain to an active session of a seaside
application.
I.e. when I want to "surf" to my seaside created web page, I do not
enter in my browser http://myurl/_sG5t7urxy;_ketc.. i just enter
http://myurl right?
So your service must accept requests with parameters that YOUR SERVICE
needs in order to return an expected response.Like
http://myurl/flexstuff/flexsvc1 and /flexstuff/flexsvc2
This requires more than a typical seaside app I think. Look at the
classes in Seaside-Request Handler category. You may need to subclass
WARequestHandler or WAEntryPoint.
This is what I get when I look at what bpurcell had to say.
Of course, I could have absolutley no idea what I am talking about. In
any event I do hope this helps.
Best regards,
Johnny
Thierry Thelliez wrote:
> I would not claim much knowledge about FLEX. There might be a better
> way to do it...
>
> I am just trying to prototype a web page with part of its content
> displayed through FLEX. Seaside would generate the HTML page contening
> a call to the SWF file (generated from compiling the FLEX code). The
> FLEX component would then call back Seaside to get some XML formatted
> data and display that in a DataGrid.
>
> FLEX can call a web service in one call. For example
> (from http://www.adobe.com/devnet/flex/quickstart/httpservice/)
>
> <mx:HTTPService
> id="photoService"
> url="http://api.flickr.com/services/feeds/photos_public.gne"
> resultFormat="e4x"
> result="photoResultHandler(event);"
> fault="photoFaultHandler(event);"
> />
>
> The first problem is that you cannot pass the URL parameters in the URL field.
>
> You could not send:
> <mx:HTTPService
> id="photoService"
> url="http://myServer/seaside/myApp?_s=68pqfS&_k=SW7A&1"
> resultFormat="e4x"
> result="photoResultHandler(event);"
> fault="photoFaultHandler(event);"
> />
>
> They have an XML formatting option using mx:request as described in:
> http://www.bpurcell.org/blog/index.cfm?entry=1040&mode=entry
>
> <mx:HTTPService url="{myURL}" id="myHTTPData" method="GET"
> resultFormat="object">
> <mx:request>
> <mode>{mode}</mode>
> <mode2>{mode2}</mode2>
> <catid>{catid}</catid>
> </mx:request>
>
>
> But translated to Seaside does not work (assuming that sField and
> kField are filled with the right values):
> <mx:HTTPService url="http://myServer/seaside/myApp" id="myHTTPData"
> method="GET" resultFormat="object">
> <mx:request>
> <_s>{sField}</_s>
> <_k>{kField}</_k>
> <1></1>
> </mx:request>
> </mx:HTTPService>
>
> The <1> is not allowed in XML and the <_s> becomes a %5Fs.
>
> I tried other options but none are friendly to the usage of
> underscores and/or the value-less parameters (the last '&1' in the
> url).
>
> Has anyone done it? How?
> Thanks,
> Thierry
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
More information about the seaside
mailing list