Examples of writeResponse()


Examples of com.ramforth.webserver.http.IHttpResponseWriter.writeResponse()

        for (IHttpHeader responseHeader : responseHeaders) {
            httpContext.getResponse().getHeaders().addHeader(responseHeader);
        }

        IHttpResponseWriter httpResponseWriter = new HttpResponseWriter(httpContext.getResponse().getOutputStream());
        httpResponseWriter.writeResponse(httpContext.getResponse());
       
        BufferedInputStream bis = new BufferedInputStream(cgiProcess.getInputStream());
        byte[] buffer = new byte[4096];
        int bytesRead = -1;
        try {
View Full Code Here

Examples of com.ramforth.webserver.http.IHttpResponseWriter.writeResponse()

        assertFileIsReadable(file);

        addHttpHeadersForWebFileTemplateToResponse(httpResponse, fileTemplate);
        IHttpResponseWriter httpResponseWriter = new HttpResponseWriter(httpResponse.getOutputStream());

        httpResponseWriter.writeResponse(httpResponse);
    }

    private void writeFileTemplateToHttpResponse(IHttpResponse httpResponse, WebFileTemplate fileTemplate) {
        writeFileTemplateHeadersToHttpResponse(httpResponse, fileTemplate);
View Full Code Here

Examples of com.ramforth.webserver.http.IHttpResponseWriter.writeResponse()

    private void writeWebStringTemplateHeadersToHttpResponse(IHttpResponse httpResponse, WebStringTemplate stringTemplate) {
        addHttpHeadersForWebStringTemplateToResponse(httpResponse, stringTemplate);
        IHttpResponseWriter httpResponseWriter = new HttpResponseWriter(httpResponse.getOutputStream());

        httpResponseWriter.writeResponse(httpResponse);
    }

    private void writeWebStringTemplateToHttpResponse(IHttpResponse httpResponse, WebStringTemplate stringTemplate) {
        writeWebStringTemplateHeadersToHttpResponse(httpResponse, stringTemplate);
View Full Code Here

Examples of com.vaadin.server.DownloadStream.writeResponse()

            if (relativeUri.startsWith("myresource_download")) {
                downloadStream.setParameter("Content-Disposition",
                        "attachment; filename=\"downloadedPNG.png\"");
            }
            downloadStream.writeResponse(request, response);
            return true;
        } catch (IOException e) {
            return false;
        }
    }
View Full Code Here

Examples of com.vaadin.server.DownloadStream.writeResponse()

            stream = resource.getStream();
        } finally {
            session.unlock();
        }

        stream.writeResponse(request, response);
        return true;
    }

    private Logger getLogger() {
        return Logger.getLogger(AbstractMedia.class.getName());
View Full Code Here

Examples of org.apache.cxf.transport.http.WSDLQueryHandler.writeResponse()

        sbc = (SoapBindingConfiguration) bc;
        assertEquals("rpc", sbc.getStyle());

        WSDLQueryHandler handler = new WSDLQueryHandler((Bus)ctx.getBean("cxf"));
        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        handler.writeResponse("http://localhost/test?wsdl", "/test",
                              bean.create().getEndpoint().getEndpointInfo(),
                              bout);
        String wsdl = bout.toString();
        assertTrue(wsdl.contains("name=\"stringArray\""));
        assertTrue(wsdl.contains("name=\"stringArray\""));
View Full Code Here

Examples of org.apache.cxf.transport.http.WSDLQueryHandler.writeResponse()

    public void testWSDLQuery() throws Exception {
        WSDLQueryHandler wqh = control.createMock(WSDLQueryHandler.class);
        String pathInfo = null;
        String addr = ADDRESS + "?wsdl";
        expect(wqh.isRecognizedQuery(addr, pathInfo, endpoint, false)).andReturn(true);
        wqh.writeResponse(eq(addr), eq(pathInfo), eq(endpoint), isA(OutputStream.class));
        EasyMock.expectLastCall();
        QueryHandlerRegistry qhr = control.createMock(QueryHandlerRegistry.class);
        expect(qhr.getHandlers()).andReturn(Collections.singletonList((QueryHandler)wqh));
        expect(bus.getExtension(QueryHandlerRegistry.class)).andReturn(qhr);
        HttpExchange exchange = setUpExchangeForWSDLQuery(pathInfo);
View Full Code Here

Examples of org.apache.cxf.transport.http.WSDLQueryHandler.writeResponse()

        sbc = (SoapBindingConfiguration) bc;
        assertEquals("rpc", sbc.getStyle());

        WSDLQueryHandler handler = new WSDLQueryHandler((Bus)ctx.getBean("cxf"));
        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        handler.writeResponse("http://localhost/test?wsdl", "/test",
                              bean.create().getEndpoint().getEndpointInfo(),
                              bout);
        String wsdl = bout.toString();
        assertTrue(wsdl.contains("name=\"stringArray\""));
        assertTrue(wsdl.contains("name=\"stringArray\""));
View Full Code Here

Examples of org.apache.cxf.transport.http.WSDLQueryHandler.writeResponse()

        sbc = (SoapBindingConfiguration) bc;
        assertEquals("rpc", sbc.getStyle());

        WSDLQueryHandler handler = new WSDLQueryHandler((Bus)ctx.getBean("cxf"));
        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        handler.writeResponse("http://localhost/test?wsdl", "/test",
                              bean.create().getEndpoint().getEndpointInfo(),
                              bout);
        String wsdl = bout.toString();
        assertTrue(wsdl.contains("name=\"stringArray\""));
        assertTrue(wsdl.contains("name=\"stringArray\""));
View Full Code Here

Examples of org.apache.cxf.transport.http.WSDLQueryHandler.writeResponse()

        sbc = (SoapBindingConfiguration) bc;
        assertEquals("rpc", sbc.getStyle());

        WSDLQueryHandler handler = new WSDLQueryHandler((Bus)ctx.getBean("cxf"));
        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        handler.writeResponse("http://localhost/test?wsdl", "/test",
                              bean.create().getEndpoint().getEndpointInfo(),
                              bout);
        String wsdl = bout.toString();
        assertTrue(wsdl.contains("name=\"stringArray\""));
        assertTrue(wsdl.contains("name=\"stringArray\""));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.