Robert Marianski created GEOS-5160 |
Issue Type: |
Improvement |
Affects Versions: |
2.2-beta2 |
Assignee: |
|
Components: |
WFS |
Created: |
13/Jun/12 10:53 AM |
Description: |
When issuing a wfs request for a layer set up with a sqlview, the viewParams are not respected. Get requests however do respect them. To reproduce, I loaded the states shape file in the geoserver release data dir into a postgis database (table called states). Then I created a geoserver sqlview for that layer. I named it “viewstates” in a workspace called “wfstesting”, and this is the sql I’m using for the sqlview: I used a default limit of 1000000 (1 million) Get requests are honoring viewParams correctly: Post requests however, are not. This is the xml I’m using (note the viewParams): And to test with curl (I put the xml in a file called “body”): I understand that the xml is generated separately, and viewParams is not part of a spec. Is there a workaround to get post requests to respect it? I tried appending the parameter to the url, but it isn’t respected there either: Glancing at the code, it looks like first the request parameters are tried, and then reading the body is attempted: So if it reads the request from the body, none of the request parameters are used (and if only viewParams is specified an exception is thrown during their processing anyway). That looks like it explains why the viewParams from the url are not being used. |
Project: |
|
Priority: |
Major |
Reporter: |