Examples of writeResponse()


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

Examples of org.apache.cxf.transports.http.QueryHandler.writeResponse()

                                             EasyMock.same(endpoint))).andReturn(Boolean.TRUE);
        EasyMock.expect(qh.getResponseContentType(EasyMock.eq(base),
                                                  EasyMock.eq(PATH))).andReturn(XML);
        ServletOutputStream sos = control.createMock(ServletOutputStream.class);
        EasyMock.expect(response.getOutputStream()).andReturn(sos);
        qh.writeResponse(EasyMock.eq(base), EasyMock.eq(PATH), EasyMock.same(endpoint), EasyMock.same(sos));
        EasyMock.expectLastCall();
        sos.flush();
        EasyMock.expectLastCall();
    }
View Full Code Here

Examples of org.apache.cxf.transports.http.QueryHandler.writeResponse()

                                             EasyMock.same(endpoint))).andReturn(Boolean.TRUE);
        EasyMock.expect(qh.getResponseContentType(EasyMock.eq(base),
                                                  EasyMock.eq(PATH))).andReturn(XML);
        ServletOutputStream sos = control.createMock(ServletOutputStream.class);
        EasyMock.expect(response.getOutputStream()).andReturn(sos);
        qh.writeResponse(EasyMock.eq(base), EasyMock.eq(PATH), EasyMock.same(endpoint), EasyMock.same(sos));
        EasyMock.expectLastCall();
        sos.flush();
        EasyMock.expectLastCall();
    }
View Full Code Here

Examples of org.apache.cxf.transports.http.QueryHandler.writeResponse()

                                             EasyMock.same(endpoint))).andReturn(Boolean.TRUE);
        EasyMock.expect(qh.getResponseContentType(EasyMock.eq(base),
                                                  EasyMock.eq(PATH))).andReturn(XML);
        ServletOutputStream sos = control.createMock(ServletOutputStream.class);
        EasyMock.expect(response.getOutputStream()).andReturn(sos);
        qh.writeResponse(EasyMock.eq(base), EasyMock.eq(PATH), EasyMock.same(endpoint), EasyMock.same(sos));
        EasyMock.expectLastCall();
        sos.flush();
        EasyMock.expectLastCall();
    }
View Full Code Here

Examples of org.apache.james.protocols.api.ProtocolTransport.writeResponse()

        ProtocolSession session = (ProtocolSession) ctx.getAttachment();
        if (e.getCause() instanceof TooLongFrameException) {
            Response r = session.newLineTooLongResponse();
            ProtocolTransport transport = ((AbstractSession)session).getProtocolTransport();
            if (r != null)  {
                transport.writeResponse(r, session);
            }
        } else {
            if (channel.isConnected()) {
                ProtocolTransport transport = ((AbstractSession)session).getProtocolTransport();
View Full Code Here

Examples of org.apache.james.protocols.api.ProtocolTransport.writeResponse()

            if (channel.isConnected()) {
                ProtocolTransport transport = ((AbstractSession)session).getProtocolTransport();

                Response r = session.newFatalErrorResponse();
                if (r != null) {
                    transport.writeResponse(r, session);
                }
                transport.writeResponse(Response.DISCONNECT, session);
            }
            if (session != null) {
                session.getLogger().debug("Unable to process request", e.getCause());
View Full Code Here

Examples of org.apache.james.protocols.api.ProtocolTransport.writeResponse()

                Response r = session.newFatalErrorResponse();
                if (r != null) {
                    transport.writeResponse(r, session);
                }
                transport.writeResponse(Response.DISCONNECT, session);
            }
            if (session != null) {
                session.getLogger().debug("Unable to process request", e.getCause());
            } else {
                logger.debug("Unable to process request", e.getCause());
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.