Agree with Andreas observations about Describe operations compliance w/ OL.

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==

Ing. Alessio Fabiani
@alfa7691
Founder/Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:   +39 0584 962313
mob:   +39  331 6233686

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------



On Thu, Sep 6, 2012 at 3:59 PM, Justin Deoliveira <jdeol...@opengeo.org>wrote:

> Hi Carlo,
>
> I forward this proposal on to some of our javascript devs and here is some
> feedback that Andreas, one of the core OpenLayers developers had.
>
> <quote>
> I like the idea of having JSONP output, but it would be nice if the
> JavaScript payload would be in a structure that we can use out of the
> box. For WMS GetFeatureInfo, the job is well done - it returns
> GeoJSON. For the other requests (WFS DescribeFeatureType, WMS
> DescribeLayer), OpenLayers has Format classes that read the XML into a
> JavaScript object, but the GeoServer output is much different from
> that object so applications would need heavy modifications when
> switching from XML + OpenLayers.Format parsing to JSONP.
>
> tl;dr: My suggestion would be to have GeoServer return the same object
> structure that OpenLayers.Format.WMSDescribeLayer and
> OpenLayers.Format.WFSDescribeFeatureType generate.
> </quote>
>
> On Thu, Sep 6, 2012 at 6:37 AM, Carlo Cancellieri <
> ccancelli...@hotmail.com> wrote:
>
>>
>> Hi Justin,
>>
>> ------------------------------
>> Date: Wed, 5 Sep 2012 20:53:32 -0400
>>
>> Subject: Re: [Geoserver-devel] GSIP 79 - Json support and WFS and WMS
>> ExceptionHandler‏s
>> From: jdeol...@opengeo.org
>> To: ccancelli...@hotmail.com
>> CC: geoserver-devel@lists.sourceforge.net
>>
>> > Thanks for laying that out Carlo.
>>
>> > In the wms doc noticed a small typo in the last table in the
>> DescribeLayer section, both formats are listed as "JSONP" ,i believe the
>> first one should be just JSON?
>>
>> Oops... yes, I'll fix it.
>>
>> > Also a question, does the default callback function name
>> "paddingOutput" come from anywhere? Like is it a convention? The wikipedia
>> page uses "parseResponse" as an example which sort of makes sense.
>>
>> Don't think there's a standard/convention, about this, it simply comes
>> out from "padding()" +output. We could define a better one commenting the
>> GSIP.
>>
> No strong opinion here. If there was something of a convention to follow i
> would say go with that but if not no worries.
>
>>
>> Carlo
>>
>>
>> On Wed, Sep 5, 2012 at 2:25 PM, Carlo Cancellieri <
>> ccancelli...@hotmail.com> wrote:
>>
>>  Hi Justing,
>> response inline:
>>
>> ------------------------------
>>
>> Date: Wed, 5 Sep 2012 12:35:46 -0400
>> Subject: Re: [Geoserver-devel] GSIP 79 - Json support and WFS and WMS
>> ExceptionHandler‏s
>> From: jdeol...@opengeo.org
>> To: ccancelli...@hotmail.com
>> CC: geoserver-devel@lists.sourceforge.net
>>
>>
>> Thanks Carlo.
>>
>> It seems thsi proposal encompasses GEOS-5246 as well, be nice is there
>> was some links there and also a bit of a description in the proposal itself
>> rather than having to go into the issues and try to determine what the high
>> level changes are.
>>
>> OK, i'll do it.
>>
>>
>> That said, i have questions about mime types used. I see both
>> application/json and text/javascript used for both output format and
>> exceptions. Can you provide a bit of clarity there? Is text/javascript used
>> to suppor the jsonp callback? In conjunction with the "callback" format
>> option?
>>
>> Let's say f.e. in a request like this:
>>
>> http://localhost:8080/geoserver/wms?
>> &INFO_FORMAT=text/javascript
>> &REQUEST=GetFeatureInfo
>> &EXCEPTIONS=application/vnd.ogc.se_xml
>> &SERVICE=WMS
>> &INFO_FORMAT=text/javascript
>> &VERSION=1.1.1
>> &WIDTH=970&HEIGHT=485&X=486&Y=165&BBOX=-180,-90,180,90
>> &LAYERS=COUNTRYPROFILES:grp_administrative_map
>> &QUERY_LAYERS=COUNTRYPROFILES:grp_administrative_map
>> &TYPENAME=COUNTRYPROFILES:grp_administrative_map
>> &format_options=callback:getLayerFeatures 
>> <http://localhost:8080/geoserver/wms?&INFO_FORMAT=text/javascript&REQUEST=GetFeatureInfo&EXCEPTIONS=application/vnd.ogc.se_xml&SERVICE=WMS&INFO_FORMAT=text/javascript&VERSION=1.1.1&WIDTH=970&HEIGHT=485&X=486&Y=165&BBOX=-180%2c-90%2c180%2c90&LAYERS=COUNTRYPROFILES:grp_administrative_map&QUERY_LAYERS=COUNTRYPROFILES:grp_administrative_map&TYPENAME=COUNTRYPROFILES:grp_administrative_map&format_options=callback:getLayerFeatures>
>>
>> You can specify the desired 'output_format':
>>
>> &INFO_FORMAT=text/javascript
>>
>> and also the desired exception format:
>>
>> &EXCEPTIONS=application/vnd.ogc.se_xml
>>
>> In this case you'll get:
>> case 1:
>> - the response in a jsonP format with the callback function called
>> getLayerFeatures
>> case 2:
>> - the exception in an xml format (as default)
>>
>> Now if you change that request in:
>>
>> http://localhost:8080/geoserver/wms?
>> &INFO_FORMAT=text/javascript
>> &REQUEST=GetFeatureInfo
>> &EXCEPTIONS=text/javascript
>> &SERVICE=WMS
>> &INFO_FORMAT=text/javascript
>> &VERSION=1.1.1
>> &WIDTH=970&HEIGHT=485&X=486&Y=165&BBOX=-180,-90,180,90
>> &LAYERS=COUNTRYPROFILES:grp_administrative_map
>> &QUERY_LAYERS=COUNTRYPROFILES:grp_administrative_map
>> &TYPENAME=COUNTRYPROFILES:grp_administrative_map
>> &format_options=callback:getLayerFeatures 
>> <http://localhost:8080/geoserver/wms?&INFO_FORMAT=text/javascript&REQUEST=GetFeatureInfo&EXCEPTIONS=text/javascript&SERVICE=WMS&INFO_FORMAT=text/javascript&VERSION=1.1.1&WIDTH=970&HEIGHT=485&X=486&Y=165&BBOX=-180%2c-90%2c180%2c90&LAYERS=COUNTRYPROFILES:grp_administrative_map&QUERY_LAYERS=COUNTRYPROFILES:grp_administrative_map&TYPENAME=COUNTRYPROFILES:grp_administrative_map&format_options=callback:getLayerFeatures>
>>
>> You'll get:
>> case 1:
>> - the response in a jsonP format with the callback function called
>> getLayerFeatures
>> case 2:
>> - the exception in a jsonP format with the callback function called
>> getLayerFeatures
>>
>> NOTE:
>> 1. I don't added a specific format_option for exception callback right
>> now, do we really need one?
>> 2. The format_options callback parameter is NOT mandatory in that case
>> (JSONP for response or exception) the default one is used paddingOutput
>> (see JSONType).
>>
>> Same things can be obtained when you use application/json.
>> In that case you are simply asking for a json without the callback
>> function (which is ignored if specified).
>>
>> Json and JsonP
>> http://en.wikipedia.org/wiki/JSONP
>>
>> Take also a look to examples here:
>> http://docs.geoserver.org/latest/en/user/services/wms/reference.html
>>
>> Hope that this answers your questions.
>>
>> Cheers,
>> Carlo
>>
>>
>> Thanks.
>>
>> -Justin
>>
>> On Wed, Sep 5, 2012 at 12:16 PM, Carlo Cancellieri <
>> ccancelli...@hotmail.com> wrote:
>>
>>  Hi all,
>>  the GSIP 79 (about Json ExceptionHandlers) is here:
>> http://geoserver.org/pages/viewpage.action?pageId=49938445
>> It is already committed on the master branch and it would be nice to
>> discuss about its backport to the stable release 2.2.2.
>>
>> Cheers,
>> Carlo
>>
>> ------------------------------
>> Date: Mon, 3 Sep 2012 11:31:21 -0500
>> From: j...@codehaus.org
>> To: ccancelli...@hotmail.com
>> Subject: [jira] (GEOS-5247) Json[p] WFS and WMS exceptionHandler
>>
>>        Justin 
>> Deoliveira<https://jira.codehaus.org/secure/ViewProfile.jspa?name=jdeolive>commented
>>  on [image:
>> Improvement] GEOS-5247 <https://jira.codehaus.org/browse/GEOS-5247>
>>  *Json[p] WFS and WMS 
>> exceptionHandler*<https://jira.codehaus.org/browse/GEOS-5247>
>>
>>   Any chance we can get a short GSIP before the work is backported.
>> Maybe at least just summarizing all the info placed into the various
>> tickets. It would be nice to get some more javascript developers eyes on
>> this on before it's set in stone on the stable branch.
>>         This message is automatically generated by JIRA.
>> If you think it was sent incorrectly, please contact your JIRA
>> administrators<https://jira.codehaus.org/secure/ContactAdministrators%21default.jspa>
>> .
>> For more information on JIRA, see: http://www.atlassian.com/software/jira
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Geoserver-devel mailing list
>> Geoserver-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>>
>>
>>
>>
>> --
>> Justin Deoliveira
>> OpenGeo - http://opengeo.org
>> Enterprise support for open source geospatial.
>>
>>
>>
>>
>>
>> --
>> Justin Deoliveira
>> OpenGeo - http://opengeo.org
>> Enterprise support for open source geospatial.
>>
>>
>
>
> --
> Justin Deoliveira
> OpenGeo - http://opengeo.org
> Enterprise support for open source geospatial.
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to