Opened 9 years ago

Closed 9 years ago

#903 closed defect (fixed)

WFS fail to connect to http://demo.opengeo.org/geoserver/wfs?service=wfs

Reported by: christinebao Owned by: Christine Bao
Priority: major Milestone: 3.9.0
Component: WFS Provider Version: 3.9.0
Severity: 3 Keywords:
Cc: External ID: DE20287

Description

Reported by Autodesk QA: cannot connect to http://demo.opengeo.org/geoserver/wfs?service=wfs.

Attachments (1)

903.patch (2.6 KB ) - added by christinebao 9 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by christinebao, 9 years ago

This is because the URL contains "service=wfs" already. FDO WFS provider tries to add it again, for example request http://demo.opengeo.org/geoserver/wfs?service=wfs&version=1.0.0&'''service=WFS'''&REQUEST=GetCapabilities, it fails:

<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows http://demo.opengeo.org:80/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="InvalidParameterValue" locator="service">
<ows:ExceptionText>
Single value expected for request parameter service but instead found: [wfs, WFS]
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>

comment:3 by christinebao, 9 years ago

This defect is caused by the WFS URL contains "service=wfs" already. Previously FDO WFS provider always add version=<version>&service=WFS&REQUEST=GetCapabilities to request, so make it:

http://demo.opengeo.org/geoserver/wfs?service=wfs&version=1.0.0&service=WFS&REQUEST=GetCapabilities

and this URL returns error:

<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows http://demo.opengeo.org:80/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="InvalidParameterValue" locator="service">
<ows:ExceptionText>
Single value expected for request parameter service but instead found: [wfs, WFS]
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>

Fix is to compare URL, if it already contains "service=WFS" (case insensitive), FDO WFS provider not add duplicate parameter again.

The same problem also happen when do DescribeFeatureType and GetFeature, as this WFS's url contains "request=..." already.

http://demo.opengeo.org:80/geoserver/wfs?request=DescribeFeatureType
http://demo.opengeo.org:80/geoserver/wfs?request=GetFeature

by christinebao, 9 years ago

Attachment: 903.patch added

comment:4 by christinebao, 9 years ago

Resolution: fixed
Status: newclosed

Fixed in r7180.

Note: See TracTickets for help on using tickets.