Thanks so much for the confirmation and tip about the Content-type header. I am 
now able to execute GetFeatureInfo-queries without having to worry about 
lengthy URL's. You really saved me alot of headache, Justin!

This userlist has really helped me out this summer, big thanks to all the 
readers!

***************************************
Paula Perkola
Trainee Research Scientist
VTT Technical Research Centre of Finland



________________________________

From: Justin Deoliveira [mailto:[email protected]]
Sent: 27. elokuuta 2010 17:13
To: Perkola Paula
Cc: [email protected]
Subject: Re: [Geoserver-users] WMS GetFeatureInfo HTTP POST fails


Actually come to think of it you should be able to use POST with GetFeatureInfo 
the regular way, but you have to mimic the submitting of a form. So basically 
create the body of the request with the key value pairs and set the 
Content-type header to "application/x-www-form-urlencoded" and it should work. 
Sorry should have thought of that before.

-Justin

On Thu, Aug 26, 2010 at 11:41 PM, Perkola Paula 
<[email protected]<mailto:[email protected]>> wrote:
Hi Justin,

Thanks for your reply. I assumed that a GetFeatureInfo via POST was possible 
since it appears in the GetCapabilities response below, but maybe I have 
misinterpreted it. I might try the WFS GetFeature out. Thanks for your help.

Regards,
Paula

***************************************
Paula Perkola
Trainee Research Scientist
VTT Technical Research Centre of Finland

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


Request URL: 
http://localhost:8080/geoserver/wms?service=wms&version=1.1.0&request=GetCapabilities

Response XML:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE WMT_MS_Capabilities SYSTEM 
"http://localhost:8080/geoserver/schemas/wms/1.1.1/WMS_MS_Capabilities.dtd";>
<WMT_MS_Capabilities version="1.1.1" updateSequence="1652">
  <Service>
    <Name>OGC:WMS</Name>
    <Title>GeoServer Web Map Service</Title>
    <Abstract>A compliant implementation of WMS 1.1.1 plus most of the SLD 1.0 
extension (dynamic styling). Can also generate PDF, SVG, KML, GeoRSS</Abstract>
    <KeywordList>
      <Keyword>WFS</Keyword>
      <Keyword>WMS</Keyword>
      <Keyword>GEOSERVER</Keyword>
    </KeywordList>
    <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"; 
xlink:type="simple" 
xlink:href="http://localhost:8080/geoserver/wms"/<http://localhost:8080/geoserver/wms%22/>>
    <ContactInformation>
      <!-- clippped -->
    </ContactInformation>
    <Fees>NONE</Fees>
    <AccessConstraints>NONE</AccessConstraints>
  </Service>
  <Capability>
    <Request>
      <GetCapabilities>
        <!-- snip snip -->
      </GetCapabilities>
      <GetMap>
        <!-- clipped -->
      </GetMap>
      <GetFeatureInfo>
        <Format>text/plain</Format>
        <Format>text/html</Format>
        <Format>application/vnd.ogc.gml</Format>
        <DCPType>
          <HTTP>
            <Get>
              <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"; 
xlink:type="simple" 
xlink:href="http://localhost:8080/geoserver/wms?SERVICE=WMS&amp;"/<http://localhost:8080/geoserver/wms?SERVICE=WMS&%22/>>
            </Get>
            <Post>
              <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"; 
xlink:type="simple" 
xlink:href="http://localhost:8080/geoserver/wms?SERVICE=WMS&amp;"/<http://localhost:8080/geoserver/wms?SERVICE=WMS&%22/>>
            </Post>
          </HTTP>
        </DCPType>
      </GetFeatureInfo>

________________________________

From: Justin Deoliveira 
[mailto:[email protected]<mailto:[email protected]>]
Sent: 26. elokuuta 2010 23:36
To: Perkola Paula
Cc: 
[email protected]<mailto:[email protected]>
Subject: Re: [Geoserver-users] WMS GetFeatureInfo HTTP POST fails


Hi Paula,

I could be mistaken but I don't believe we support GetFeatureInfo via POST.

If you want to use http post your best bet is probably to use WFS GetFeature 
(which you can execute via post) rather than WMS GetFeatureInfo. However you 
won't be able to get html back and won't be able to customize the response with 
a template. You will be restricted to gml, json, shapefile, or the other vector 
output formats supported via the ogr extension.

Hope that helps.

-Justin

On Wed, Aug 25, 2010 at 6:55 AM, Perkola Paula 
<[email protected]<mailto:[email protected]>> wrote:
Hi everyone,

I am trying to execute a WMS GetFeatureInfo query with HTTP POST, but I get the 
error message shown below from Jetty. Is there something wrong with the xml 
request syntax or is the problem with GeoServer? I am running GeoServer 2.0.2.

I was previously executing my WMS GetFeatureInfo queries with HTTP GET, but as 
the number of queried layers and thus length of the GET URL increased I 
received FULL head error messages from Jetty. I am now trying to circumvent the 
lengthy URL dilemma by executing an HTTP POST instead. Any ideas or nudges in 
the right direction would be greatly appreciated.

Regards,
Paula
***************************************
Paula Perkola
Trainee Research Scientist
VTT Technical Research Centre of Finlan

------------------------------------------------------------------------------------------------------------------------------------------------------------
<Jetty Error Message>

25 elo 15:42:51 DEBUG [org.geoserver.filters] - filtering 
http://localhost:8080/geoserver/wms
25 elo 15:42:51 DEBUG [org.vfny.geoserver.requests] - First 4 bytes of XML doc 
are : 3C ('<') 3F ('?
') 78 ('x') 6D ('m')
25 elo 15:42:51 DEBUG [org.vfny.geoserver.requests] - Charset detection phase 
1. Inferred encoding:
UTF-8
25 elo 15:42:51 DEBUG [org.vfny.geoserver.requests] - Charset detection phase 
2. Charset in XML decl
aration is `UTF-8`.
25 elo 15:42:51 DEBUG [org.vfny.geoserver.requests] - Trying to create reader 
basing on existing cha
rset information: `UTF-8`.
25 elo 15:42:51 DEBUG [org.geoserver.ows] - Raw XML request starts with: <?xml 
version="1.0" encodin
g="UTF-8"?><wms:GetFeatureInfo service="WMS" outputFormat="text/html" 
xmlns:wms="http://www.opengis.
net/wms" ><wms:Query 
layers="syke:syke_swe_20100412_0000z_24h_2_0_0d0_255_255d0_cm_ver1_amsr-e"></wm
s:Query></wms:GetFeature>


25 elo 15:42:51 INFO [org.geoserver.ows] - No xml reader: 
(http://www.opengis.net/wms,GetFeatureInfo
)
25 elo 15:42:51 ERROR [org.geoserver.ows] -
org.geoserver.platform.ServiceException: Could not find request reader (either 
kvp or xml) for: org.
vfny.geoserver.wms.requests.GetFeatureInfoRequest
        at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:478)
        at 
org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:227)
        at 
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.j
ava:153)
        at 
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControlle
rHandlerAdapter.java:48)
        at 
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
        at 
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
        at 
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571
)
        at 
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
        at 
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter
.java:108)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at 
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java
:265)
        at 
org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityIntercepto
r.java:107)
        at 
org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityIntercep
tor.java:72)
        at 
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java
:275)
        at 
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:
124)
        at 
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java
:275)
        at 
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcess
ingFilter.java:125)
        at 
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java
:275)
        at 
org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:
174)
        at 
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java
:275)
        at 
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContext
IntegrationFilter.java:249)
        at 
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java
:275)
        at 
org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
        at 
org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at 
org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
        at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
        at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
        at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:2
06)
        at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:324)
        at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
        at 
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
        at 
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
        at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)




------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Geoserver-users mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/geoserver-users




--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.




--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to