epicureanism / inspire-foss

Automatically exported from code.google.com/p/inspire-foss
GNU General Public License v3.0
0 stars 0 forks source link

DescribeFeatureType request fails with NPE when invoked with no feature type names #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. run the deegree3 wfs (see /webapps/deegree3)
2. start OGC web client
3. invoke DescribeFeatureType (with no feature type names)

What is the expected output? What do you see instead?
Valid response describing all feature types. 
Instead an exception (NPE) is thrown.

This is due to a NULL value passed to the constructor of DescribeFeatureType 
within DescribeFeatureTypeXMLAdapter.parse110()
followed by accessing this NULL value in 
DescribeFeatureTypeHandler.doDescribeFeatureType() when no feature types given 
with request

Please use labels and text to provide additional information.

This is the request:

<?xml version="1.0" encoding="UTF-8"?>
<wfs:DescribeFeatureType version="1.1.0" service="WFS" 
xmlns:wfs="http://www.opengis.net/wfs" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" outputFormat="text/xml; 
subtype=gml/3.2.1">
</wfs:DescribeFeatureType>

This is the empty owsException:

<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.opengis.net/ows 
http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd" version="1.0.0">
  <ows:Exception exceptionCode="NoApplicableCode">
    <ows:ExceptionText></ows:ExceptionText>
  </ows:Exception>
</ows:ExceptionReport>

This is the exception raised:

java.lang.NullPointerException
    at org.deegree.services.wfs.DescribeFeatureTypeHandler.doDescribeFeatureType(DescribeFeatureTypeHandler.java:181)
    at org.deegree.services.wfs.WFSController.doXML(WFSController.java:433)
    at org.deegree.services.controller.OGCFrontController.dispatchXMLRequest(OGCFrontController.java:700)
    at org.deegree.services.controller.OGCFrontController.doPost(OGCFrontController.java:475)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

Original issue reported on code.google.com by jus...@gmail.com on 20 Sep 2010 at 10:21

GoogleCodeExporter commented 9 years ago
Fixed and verified.

Original comment by jus...@gmail.com on 16 Nov 2010 at 10:42