Package org.apache.openejb.server.httpd

Examples of org.apache.openejb.server.httpd.HttpResponse


        if (listener == null) {
            throw new ServletException("RESTServiceContainer has not been set");
        }

        HttpRequest httpRequest = new ServletRequestAdapter(req, res, servletConfig.getServletContext());
        HttpResponse httpResponse = new ServletResponseAdapter(res);

        try {
            listener.onMessage(httpRequest, httpResponse);
        } catch (IOException e) {
            throw e;
View Full Code Here


        ServletEndpointContext context = getContext();
        endpointContext.set(new InvocationContext((HttpServletRequest) req));
        try {
            res.setContentType("text/xml");
            HttpRequest httpRequest = new ServletRequestAdapter((HttpServletRequest) req, (HttpServletResponse) res, config.getServletContext());
            HttpResponse httpResponse = new ServletResponseAdapter((HttpServletResponse) res);

            if (pojo != null) {
                req.setAttribute(WsConstants.POJO_INSTANCE, pojo);
            }
View Full Code Here

        final ServletEndpointContext context = getContext();
        endpointContext.set(new InvocationContext((HttpServletRequest) req));
        try {
            res.setContentType("text/xml");
            final HttpRequest httpRequest = new ServletRequestAdapter((HttpServletRequest) req, (HttpServletResponse) res, config.getServletContext());
            final HttpResponse httpResponse = new ServletResponseAdapter((HttpServletResponse) res);

            if (pojo != null) {
                req.setAttribute(WsConstants.POJO_INSTANCE, pojo);
            }
View Full Code Here

        if (listener == null) {
            throw new ServletException("RESTServiceContainer has not been set");
        }

        final HttpRequest httpRequest = new ServletRequestAdapter(req, res, servletConfig.getServletContext());
        final HttpResponse httpResponse = new ServletResponseAdapter(res);

        try {
            listener.onMessage(httpRequest, httpResponse);
        } catch (final IOException e) {
            throw e;
View Full Code Here

         * mappings of the corresponding input message (if any).
         *
         * @param message the message to be sent.
         */
        public void send(Message message) throws IOException {
            HttpResponse response = request.get(HttpResponse.class);

            // handle response headers
            updateResponseHeaders(message);

            Map<String, List<String>> protocolHeaders = getProtocolHeaders(message);

            // set headers of the HTTP response object
            for (Map.Entry<String, List<String>> entry : protocolHeaders.entrySet()) {
                String headerName = entry.getKey();
                String headerValue = getHeaderValue(entry.getValue());
                response.setHeader(headerName, headerValue);
            }

            message.setContent(OutputStream.class, new WrappedOutputStream(message, response));
        }
View Full Code Here

         * mappings of the corresponding input message (if any).
         *
         * @param message the message to be sent.
         */
        public void send(Message message) throws IOException {
            HttpResponse response = request.get(HttpResponse.class);

            // handle response headers
            updateResponseHeaders(message);

            Map<String, List<String>> protocolHeaders = getProtocolHeaders(message);

            // set headers of the HTTP response object
            for (Map.Entry<String, List<String>> entry : protocolHeaders.entrySet()) {
                String headerName = entry.getKey();
                String headerValue = getHeaderValue(entry.getValue());
                response.setHeader(headerName, headerValue);
            }

            message.setContent(OutputStream.class, new WrappedOutputStream(message, response));
        }
View Full Code Here

        ServletEndpointContext context = getContext();
        endpointContext.set(new InvocationContext((HttpServletRequest) req));
        try {
            res.setContentType("text/xml");
            HttpRequest httpRequest = new ServletRequestAdapter((HttpServletRequest) req, (HttpServletResponse) res, config.getServletContext());
            HttpResponse httpResponse = new ServletResponseAdapter((HttpServletResponse) res);

            if (pojo != null) {
                req.setAttribute(WsConstants.POJO_INSTANCE, pojo);
            }
View Full Code Here

        ServletEndpointContext context = getContext();
        endpointContext.set(new InvocationContext((HttpServletRequest) req));
        try {
            res.setContentType("text/xml");
            HttpRequest httpRequest = new ServletRequestAdapter((HttpServletRequest) req, (HttpServletResponse) res, config.getServletContext());
            HttpResponse httpResponse = new ServletResponseAdapter((HttpServletResponse) res);

            if (pojo != null) {
                req.setAttribute(WsConstants.POJO_INSTANCE, pojo);
            }
View Full Code Here

        if (listener == null) {
            throw new ServletException("RESTServiceContainer has not been set");
        }

        HttpRequest httpRequest = new ServletRequestAdapter(req, res, servletConfig.getServletContext());
        HttpResponse httpResponse = new ServletResponseAdapter(res);

        try {
            listener.onMessage(httpRequest, httpResponse);
        } catch (IOException | ServletException e) {
            throw e;
View Full Code Here

        if (listener == null) {
            throw new ServletException("RESTServiceContainer has not been set");
        }

        HttpRequest httpRequest = new ServletRequestAdapter(req, res, servletConfig.getServletContext());
        HttpResponse httpResponse = new ServletResponseAdapter(res);

        try {
            listener.onMessage(httpRequest, httpResponse);
        } catch (IOException e) {
            throw e;
View Full Code Here

TOP

Related Classes of org.apache.openejb.server.httpd.HttpResponse

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.