Package org.vfny.geoserver

Examples of org.vfny.geoserver.Request


        } catch (ParserConfigurationException e) {
            throw new WfsException(e, "Some sort of issue creating parser",
                XmlRequestReader.class.getName());
        }

        Request r = contentHandler.getRequest(req);
        return r;
    }
View Full Code Here


        }

        LOGGER.finer("about to return ");
        LOGGER.finer("returning " + contentHandler.getRequest(req));

        Request r = contentHandler.getRequest(req);
        return r;
    }
View Full Code Here

                getClass().getName());
        } catch (ParserConfigurationException e) {
            throw new WfsException(e, "Some sort of issue creating parser",
                getClass().getName());
        }
        Request r = currentRequest.getRequest(req);
        return r;
    }
View Full Code Here

        } catch (ParserConfigurationException e) {
            throw new WfsException(e, "Some sort of issue creating parser",
                XmlRequestReader.class.getName());
        }

        Request r = contentHandler.getRequest(req);
        return r;
    }
View Full Code Here

    public void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
        // implements the main request/response logic
        this.curRequest = request;

        Request serviceRequest = null;

        if (!isServiceEnabled(request)) {
            response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);

            return;
View Full Code Here

    public void doPost(HttpServletRequest request,
        HttpServletResponse response, Reader requestXml)
        throws ServletException, IOException {
        this.curRequest = request;

        Request serviceRequest = null;

        //TODO: This isn't a proper ogc service response.
        if (!isServiceEnabled(request)) {
            response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);

            return;
        }

        // implements the main request/response logic
        try {
            XmlRequestReader requestReader = getXmlRequestReader();
           
            //JD: GEOS-323, adding support for character encoding detection
            // Reader xml = (requestXml != null) ? requestXml : request.getReader();
            Reader xml;
            if (null != requestXml) {
                xml = requestXml;
            } else {
                /*
                 * `getCharsetAwareReader` returns a reader which not support
                 * mark/reset. So it is a good idea to wrap it into BufferedReader.
                 * In this case the below debug output will work.
                 */
                xml = new BufferedReader(
                          XmlCharsetDetector.getCharsetAwareReader(
                              request.getInputStream()));
            }
            //JD: GEOS-323
           
            //DJB: add support for POST loggin
            if (LOGGER.isLoggable(Level.FINE)) {
              if (xml.markSupported())
              {
                  // a little protection for large POSTs (ie. updates)
                    // for FINE, I assume people just want to see the "normal" ones - not the big ones
                    // for FINER, I assume they would want to see a bit more
                    // for FINEST, I assume they would want to see even more
                int maxChars = 16000;  
                if (LOGGER.isLoggable(Level.FINER))
                  maxChars = 64000;
                if (LOGGER.isLoggable(Level.FINEST))
                  maxChars = 640000// Bill gates says 640k is good enough for anyone
               
                xml.mark(maxChars+1); // +1 so if you read the whole thing you can still reset()
                char buffer[] = new char[maxChars];
                int actualRead = xml.read(buffer);
                xml.reset();
                LOGGER.fine("------------XML POST START-----------\n"+new String(buffer,0,actualRead)+"\n------------XML POST END-----------");
                if (actualRead ==maxChars )
                  LOGGER.fine("------------XML POST REPORT WAS TRUNCATED AT "+maxChars+" CHARACTERS.  RUN WITH HIGHER LOGGING LEVEL TO SEE MORE");
              }
              else
              {
                LOGGER.fine("ATTEMPTED TO LOG POST XML, BUT WAS PREVENTED BECAUSE markSupported() IS FALSE");
              }
            }
           
            serviceRequest = requestReader.read(xml, request);
            serviceRequest.setHttpServletRequest(request);
        } catch (ServiceException se) {
            sendError(response, se);

            return;
        } catch (Throwable e) {
View Full Code Here

    protected boolean runKvpTest(Request baseRequest, String requestString,
        boolean match) throws Exception {
        // Read the file and parse it
        Map kvps = KvpRequestReader.parseKvpSet(requestString);
        KvpRequestReader reader = getKvpReader(kvps);
        Request request = reader.getRequest( baseRequest.getHttpServletRequest());

        LOGGER.finer("base request: " + baseRequest);
        LOGGER.finer("read request: " + request);
        LOGGER.fine("KVP test passed: " + baseRequest.equals(request));
View Full Code Here

        throws ServiceException {
        //get the delegate
        Response delegate = (Response) value;

        //get the requst object from the operation
        Request request = (Request) OwsUtils.parameter(operation.getParameters(), Request.class);

        //the old contract specifies that execute must be called before
        // get content type
        delegate.execute(request);
View Full Code Here

TOP

Related Classes of org.vfny.geoserver.Request

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.