I was thinking to keep things more clean moving:
/wfs-2.3-SNAPSHOT/src/main/java/org/geoserver/wfs/GeoJSONBuilder.java/wfs-2.3-SNAPSHOT/src/main/java/org/geoserver/wfs/GeoJSONOutputFormat.javato/wfs-2.3-SNAPSHOT/src/main/java/org/geoserver/wfs/json/GeoJSONBuilder.java
/wfs-2.3-SNAPSHOT/src/main/java/org/geoserver/wfs/json/GeoJSONOutputFormat.java
and
/wfs-2.3-SNAPSHOT/src/test/java/org/geoserver/wfs/GeoJSONBuilderTest.java/wfs-2.3-SNAPSHOT/src/test/java/org/geoserver/wfs/GeoJSONTest.java
to/wfs-2.3-SNAPSHOT/src/test/java/org/geoserver/wfs/json/GeoJSONBuilderTest.java/wfs-2.3-SNAPSHOT/src/test/java/org/geoserver/wfs/json/GeoJSONTest.java
May be this is not a good Idea, do you think this may brake some extensions?
Cheers,Carlo
Date: Thu, 20 Sep 2012 08:20:06 -0600
Subject: Re: [Geoserver-devel] GSIP 79 - Json support and WFS and WMS
ExceptionHandlers
From: jdeol...@opengeo.org
To: ccancelli...@hotmail.com
CC: geoserver-devel@lists.sourceforge.net
On Thu, Sep 20, 2012 at 5:54 AM, Carlo Cancellieri <ccancelli...@hotmail.com>
wrote:
All I'm going to applying requested changes:I see Justin suggested
theparseResponse
as callback method name.
Is it good for you?
Anderas is on vacation this week and won't be back until next week. I don't
have a precedent for the name aside from the fact that "parseResponse" makes
more sense to me than "paddingOutput" based on the usage of it. But i of course
delegate to someone else more experienced with applications that use jsonp.
Carlo
Date: Wed, 5 Sep 2012 20:53:32 -0400
Subject: Re: [Geoserver-devel] GSIP 79 - Json support and WFS and WMS
ExceptionHandlers
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?
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.
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
ExceptionHandlers
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:getLayerFeaturesYou can specify the desired
'output_format':
&INFO_FORMAT=text/javascriptand 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
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
commented on GEOS-5247
Json[p] WFS and WMS exceptionHandler
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.
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 DeoliveiraOpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
--
Justin DeoliveiraOpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
--
Justin DeoliveiraOpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel