[Users] GeoExt.data.WFSCapabilitiesStore: cross domain
Eric Lemoine
eric.lemoine at camptocamp.com
Wed Oct 21 21:26:13 CEST 2009
2009/10/21 Andreas Hocevar <ahocevar at opengeo.org>:
> Cédric Moullet wrote:
>> Hi,
>> In GeoExt.data.WFSCapabilitiesStore, the Ext.data.HttpProxy is used.
>> Is there any reason why Ext.data.ScriptTagProxy is not used ?
>
> Yes, there is. XML in a script tag would get you nothing but a script
> execution error.
>
>> This would avoid the cross domain problem.
>
> But only if the response from the server was executable JavaScript.
yes. Cédric was mentioning geonames to me. In the case of geonames you
can provide a "callback" parameter in the request (e.g.
&callback=myhandler), in that case the response from geonames looks
like this : "myhandler({"totalResultsCount":23,"geonames":[{"fcl":"P",
....]});". So if you use a ScriptProxy that response is evaluated by
the javascript engine, and myhandler gets executed.
Hope this clarifies it,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com
More information about the Users
mailing list