Package org.apache.openejb.server.httpd

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


    public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
        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) {
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

    public void service(final HttpServletRequest req, final HttpServletResponse res) throws ServletException, IOException {
        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) {
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

        doInvoke(httpRequest, httpResponse);
    }

    // normal endpoint without static resource handling
    public void doInvoke(final HttpRequest httpRequest, final HttpResponse httpResponse) throws IOException {
        String baseURL = BaseUrlHelper.getBaseURL(pattern != null ? new ServletRequestAdapter(httpRequest) {
            @Override // we have a filter so we need the computed servlet path to not break CXF
            public String getServletPath() {
                return pattern;
            }
        } : httpRequest);
View Full Code Here

    public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
        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) {
View Full Code Here

            }
        }

        try {
            delegate.doInvoke(
                    new ServletRequestAdapter(httpServletRequest, httpServletResponse, request.getServletContext()),
                    new ServletResponseAdapter(httpServletResponse));
        } catch (final Exception e) {
            throw new ServletException("Error processing webservice request", e);
        }
    }
View Full Code Here

    public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
        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) {
View Full Code Here

TOP

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

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.