perl wrapper redirs work great for WMS, bomb for WFS via .map

Charlton Purvis cpurvis at ASG.SC.EDU
Fri Jun 3 09:22:26 EDT 2005


Hi, folks:

I think I mailed the list w/ this problem earlier, but I may have punted
trying to really buckle down and figure out what the issue was.  Well,
it's back rearing its ugly face, and I have upgraded MS, GDAL, you name it
to make sure it wasn't a version issue.

I serve up in-situ weather data via WMS and WFS.  So I wanted to make sure
that a client .map could get to my data via WFS to display it however they
wanted.  Makes sense.  Well, both the WMS and WFS services are perl
wrappers that do some magic and then redirect the request to a new URL.
WMS works splendidly, but WFS bombs by not following the new URL.  Why is
there this difference?

Here is an example of a LAYER that should work and pull back air
temperatures as a bunch of ugly numbers on a map.

  LAYER
    NAME air_temperature
    TYPE POINT
    STATUS DEFAULT
    CONNECTIONTYPE WFS
    CONNECTION "http://nautilus.baruch.sc.edu/wfs/seacoos_in_situ?"
    METADATA
      "wfs_service"           "WFS"
      "wfs_typename"          "air_temperature_obs_hourly"
      "wfs_version"           "1.0.0"
      "wfs_request_method"    "GET"
      "wfs_connectiontimeout" "60"
    END
    PROJECTION
      "init=epsg:4269"
    END
    LABELITEM "temperature_celcius"
    CLASS
      LABEL
        TYPE BITMAP
        SIZE SMALL
        FORCE TRUE
        COLOR 0 0 0
      END
      STYLE END
    END
  END

Running this through shp2img w/ the latest and greatest MS gives me:
msDrawMap(): Image handling error. Failed to draw layer
named 'air_temperature'.
msWFSLayerWhichShapes(): WFS connection error. Got HTTP status 302
downloading WFS layer air_temperature
msHTTPExecuteRequests(): HTTP request error. HTTP GET request failed with
status 302 () for http://nautilus.baruch.sc.edu/wfs/seacoos_in_situ?
&REQUEST=GetFeature&VERSION=1.0.0&SERVICE=WFS&TYPENAME=air_temperature_obs_
hourly&BBOX=-89,23.797368421052628,-79.849999999999994,31.502631578947373

But if you plug that URL into anything other than IE (IE for some reason
doesn't like it), you *do* get back valid GML because it does get rerouted
to a different URL.

Now if you're trying to ping my WFS services via anything other than
a .map, it works just find.  GDAL => psql works great.

Any ideas?

Thanks mucho.

Charlton



More information about the mapserver-users mailing list