Package org.geotools.data.wfs

Examples of org.geotools.data.wfs.TestHttpResponse


        throw new IllegalArgumentException("Unknown request : " + request);
    }

    private Response mockCapabilities() throws IOException, ServiceException {
        HTTPResponse httpResp = new TestHttpResponse("text/xml", "UTF-8", super.serverURL);

        return new GetCapabilitiesResponse(httpResp);
    }
View Full Code Here


        String resource = "DescribeFeatureType_" + typeName.getLocalPart() + ".xsd";
        URL contentUrl = new URL(baseDirectory, resource);

        String outputFormat = request.getOutputFormat();

        HTTPResponse response = new TestHttpResponse(outputFormat, "UTF-8", contentUrl);
        DescribeFeatureTypeResponse ret = new DescribeFeatureTypeResponse(request, response);
        FeatureType featureType = ret.getFeatureType();
        this.featureTypes.put(typeName, (SimpleFeatureType) featureType);
        return ret;
    }
View Full Code Here

        String resource = "GetFeature_" + typeName.getLocalPart() + ".xml";
        URL contentUrl = new URL(baseDirectory, resource);

        String outputFormat = request.getOutputFormat();

        HTTPResponse httpResponse = new TestHttpResponse(outputFormat, "UTF-8", contentUrl);

        WFSResponse response = request.createResponse(httpResponse);

        if (!(response instanceof GetFeatureResponse)) {
            return response;
View Full Code Here

        }

        String outputFormat = request.getOutputFormat();
        String responseContents = createTransactionResponseXml(added, updated, deleted);
        HTTPResponse httpResponse = new TestHttpResponse(outputFormat, "UTF-8", responseContents);
       
        return request.createResponse(httpResponse);
    }
View Full Code Here

    @Test
    public void testGetFeatureWithNorthEastAxisOrderOutputEPSG4326() throws Exception {
     
      final InputStream dataStream = TestData.openStream(this, "axisorder/GetFeatureById4326.xml");
        TestHttpResponse httpResponse = new TestHttpResponse("text/xml; subtype=gml/3.1.1",
                "UTF-8", dataStream);
        TestHttpProtocol mockHttp = new TestHttpProtocol(httpResponse);       
        createTestProtocol("axisorder/GetCapabilities.xml", mockHttp);
       
        // axis order used will be NORTH / EAST
View Full Code Here

   
    @Test
    public void testGetFeatureWithNorthEastAxisOrderFilter() throws Exception {
       
        final InputStream dataStream = TestData.openStream(this, "axisorder/GetFeaturesByBBox.xml");
        TestHttpResponse httpResponse = new TestHttpResponse("text/xml; subtype=gml/3.1.1",
                "UTF-8", dataStream);
        TestHttpProtocol mockHttp = new TestHttpProtocol(httpResponse);
        createTestProtocol("axisorder/GetCapabilities.xml", mockHttp);

        // override the describe feature type url so it loads from the test resource
View Full Code Here

   
    @Test
    public void testGetFeatureWithEastNorthAxisOrderFilter() throws Exception {
       
        final InputStream dataStream = TestData.openStream(this, "axisorder/GetFeaturesByBBox.xml");
        TestHttpResponse httpResponse = new TestHttpResponse("text/xml; subtype=gml/3.1.1",
                "UTF-8", dataStream);
        TestHttpProtocol mockHttp = new TestHttpProtocol(httpResponse);
        createTestProtocol("axisorder/GetCapabilities.xml", mockHttp);

        // override the describe feature type url so it loads from the test resource
View Full Code Here

   
    @Test
    public void testGetFeatureWithCompliantAxisOrderFilter() throws Exception {
       
        final InputStream dataStream = TestData.openStream(this, "axisorder/GetFeaturesByBBox.xml");
        TestHttpResponse httpResponse = new TestHttpResponse("text/xml; subtype=gml/3.1.1",
                "UTF-8", dataStream);
        TestHttpProtocol mockHttp = new TestHttpProtocol(httpResponse);
        createTestProtocol("axisorder/GetCapabilities.xml", mockHttp);

        // override the describe feature type url so it loads from the test resource
View Full Code Here

    }
   
    @Test
    public void testGetFeatureWithEastNorthAxisOrderOutputEPSG4326() throws Exception {       
      final InputStream dataStream = TestData.openStream(this, "axisorder/GetFeatureById4326.xml");
        TestHttpResponse httpResponse = new TestHttpResponse("text/xml; subtype=gml/3.1.1",
                "UTF-8", dataStream);
        TestHttpProtocol mockHttp = new TestHttpProtocol(httpResponse);
        createTestProtocol("axisorder/GetCapabilities.xml", mockHttp);

        // override the describe feature type url so it loads from the test resource
View Full Code Here

    }   
   
    @Test
    public void testGetFeatureWithEastNorthAxisOrderOutputEPSG3857() throws Exception {       
      final InputStream dataStream = TestData.openStream(this, "axisorder/GetFeatureById.xml");
        TestHttpResponse httpResponse = new TestHttpResponse("text/xml; subtype=gml/3.1.1",
                "UTF-8", dataStream);
        TestHttpProtocol mockHttp = new TestHttpProtocol(httpResponse);
        createTestProtocol("axisorder/GetCapabilities.xml", mockHttp);

        // override the describe feature type url so it loads from the test resource
View Full Code Here

TOP

Related Classes of org.geotools.data.wfs.TestHttpResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.