Package org.geotools.data.wfs

Examples of org.geotools.data.wfs.MockHttpResponse


 
  class TinyArcGISServerMockHttpClient extends MockHttpClient {
        @Override
        public HTTPResponse get(URL url) throws IOException {
            if (url.getQuery().contains("REQUEST=GetCapabilities")) {
                return new MockHttpResponse(TestData.getResource(this, "arcgisserver/GetCapabilitiesResult.xml"), "text/xml");
            } else {
                return super.get(url);
            }
        }
View Full Code Here


        @Override
        public HTTPResponse post(URL url, InputStream postContent, String postContentType) throws IOException {
            String request = new String(IOUtils.toByteArray(postContent), "UTF-8");
            if (!postContentType.isEmpty())
            {
              return new MockHttpResponse(TestData.getResource(this, "arcgisserver/GetFeaturesResult.xml"), "text/xml");
            }
            else
            {
                return super.post(url, new ByteArrayInputStream(request.getBytes("UTF-8")), postContentType);
            }
View Full Code Here

TOP

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

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.