Package org.geotools.data.wms.response

Examples of org.geotools.data.wms.response.GetFeatureInfoResponse


        String success = "SUCCESS";
       
        ByteArrayInputStream input = new ByteArrayInputStream(success.getBytes());
       
        HTTPResponse response = new MockHttpResponse( input, "text/html");
        return new GetFeatureInfoResponse( response );
      }
     
      String failure = "FAILURE";
     
      ByteArrayInputStream input = new ByteArrayInputStream(failure.getBytes());
      HTTPResponse response = new MockHttpResponse( input, "text/html");
     
      return new GetFeatureInfoResponse( response );
    }
View Full Code Here


        getFeatureInfo.setInfoFormat("text/html");
        getFeatureInfo.setQueryLayers( Collections.singleton(layer));
        getFeatureInfo.setQueryPoint( 75100 );
        URL url2 = getFeatureInfo.getFinalURL();
       
        GetFeatureInfoResponse response = wms.issueRequest(getFeatureInfo);
        assertEquals("text/html", response.getContentType() );
        InputStream stream = response.getInputStream();
        StringBuilderWriter writer = new StringBuilderWriter();
        IOUtils.copy(stream, writer );
       
        String info = writer.toString();
        assertTrue( "response available", !info.isEmpty() );
View Full Code Here

            request.setInfoFormat("text/html");
           
            //System.out.println(request.getFinalURL());
           
//     TODO   Currently this server rtreturns code 400 !?
            GetFeatureInfoResponse response = (GetFeatureInfoResponse) wms.issueRequest(request);
            //System.out.println(response.getContentType());
            assertTrue( response.getContentType().indexOf("text/html") != -1 );
            BufferedReader in = new BufferedReader(new InputStreamReader(response.getInputStream()));
            String line;
           
            boolean textFound = false;
            while ((line = in.readLine()) != null) {
                //System.out.println(line);
View Full Code Here

        try {
            if(LOGGER.isLoggable(Level.FINE)) {
                LOGGER.fine("Issuing request: " + request.getFinalURL());
            }
            GetFeatureInfoResponse response = wms.issueRequest(request);
            return response.getInputStream();
        } catch (IOException e) {
            throw e;
        } catch (Throwable t) {
            throw (IOException) new IOException("Failed to grab feature info").initCause(t);
        }
View Full Code Here

            return WMS1_0_0.processKey(key);
        }
       
        public Response createResponse(HTTPResponse httpResponse) throws ServiceException,
                IOException {
            return new GetFeatureInfoResponse(httpResponse);
        }
View Full Code Here

TOP

Related Classes of org.geotools.data.wms.response.GetFeatureInfoResponse

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.