Package org.apache.servicemix.components.util

Examples of org.apache.servicemix.components.util.EchoComponent


        jbi.shutDown();
        broker.stop();
    }
   
    public void testSync() throws Exception {
        EchoComponent echo = new EchoComponent();
        echo.setService(new QName("urn:test", "echo"));
        echo.setEndpoint("echo");
        jbi.activateComponent(echo, "echo");
       
        HttpEndpoint ep0 = new HttpEndpoint();
        ep0.setService(new QName("urn:test", "s0"));
        ep0.setEndpoint("ep0");
View Full Code Here


        client.done(me);
        tm.commit();
    }
   
    public void testAsync() throws Exception {
        EchoComponent echo = new EchoComponent();
        echo.setService(new QName("urn:test", "echo"));
        echo.setEndpoint("echo");
        jbi.activateComponent(echo, "echo");
       
        HttpEndpoint ep0 = new HttpEndpoint();
        ep0.setService(new QName("urn:test", "s0"));
        ep0.setEndpoint("ep0");
View Full Code Here

        assertEquals(HttpServletResponse.SC_BAD_REQUEST, state);
        FileUtil.copyInputStream(method.getResponseBodyAsStream(), System.out);
    }

    public void testSoap() throws Exception {
        EchoComponent echo = new EchoComponent();
        echo.setService(new QName("urn:test", "echo"));
        echo.setEndpoint("echo");
        container.activateComponent(echo, "echo");
       
        HttpComponent http = new HttpComponent();
       
        HttpEndpoint ep1 = new HttpEndpoint();
View Full Code Here

                       new StreamSource(getClass().getResourceAsStream("soap-request.xml")));
       
    }
   
    public void testSoapRoundtripConsumerProvider() throws Exception {
        EchoComponent echo = new EchoComponent();
        echo.setService(new QName("urn:test", "echo"));
        echo.setEndpoint("echo");
        container.activateComponent(echo, "echo");
       
        HttpComponent http = new HttpComponent();
       
        HttpEndpoint ep1 = new HttpEndpoint();
View Full Code Here

        client.done(me);
        logger.info(str);
    }

    public void testSoapRoundtripProviderConsumerProvider() throws Exception {
        EchoComponent echo = new EchoComponent();
        echo.setService(new QName("urn:test", "echo"));
        echo.setEndpoint("echo");
        container.activateComponent(echo, "echo");
       
        HttpComponent http = new HttpComponent();
       
        HttpEndpoint ep1 = new HttpEndpoint();
View Full Code Here

        e = DOMUtil.getFirstChildElement(e);
        assertEquals(new QName("", "clientSessionGuid"), DOMUtil.getQName(e));
    }
   
    public void testAttachments() throws Exception {
        EchoComponent echo = new EchoComponent();
        echo.setService(new QName("urn:test", "echo"));
        echo.setEndpoint("echo");
        container.activateComponent(echo, "echo");
       
        HttpComponent http = new HttpComponent();
       
        HttpEndpoint ep0 = new HttpEndpoint();
View Full Code Here

        // HTTP Component
        HttpComponent component = new HttpComponent();
        container.activateComponent(component, "HTTPComponent");
       
        // Add a receiver component
        ActivationSpec asEcho = new ActivationSpec("echo", new EchoComponent() {
            public Document getServiceDescription(ServiceEndpoint endpoint) {
                try {
                    Definition def = WSDLFactory.newInstance().newDefinition();
                    PortType type = def.createPortType();
                    type.setUndefined(false);
View Full Code Here

        HttpComponent component = new HttpComponent();
        component.getConfiguration().setStreamingEnabled(streaming);
        container.activateComponent(component, "HTTPComponent");

        // Add a echo component
        EchoComponent echo = new EchoComponent();
        ActivationSpec asReceiver = new ActivationSpec("echo", echo);
        asReceiver.setService(new QName("test", "echo"));
        container.activateComponent(asReceiver);

        // Add the http receiver
View Full Code Here

        }
    }

    protected void testWSDL(final Definition def, int portNumber) throws Exception {
        // Add a receiver component
        ActivationSpec asEcho = new ActivationSpec("echo", new EchoComponent() {
            public Document getServiceDescription(ServiceEndpoint endpoint) {
                try {
                    Document doc = WSDLFactory.newInstance().newWSDLWriter().getDocument(def);
                    return doc;
                } catch (Exception e) {
View Full Code Here

        HttpComponent component = new HttpComponent();
        component.getConfiguration().setStreamingEnabled(streaming);
        container.activateComponent(component, "HTTPComponent");
       
        // Add a receiver component
        EchoComponent echo = new EchoComponent();
        ActivationSpec asReceiver = new ActivationSpec("echo", echo);
        asReceiver.setService(new QName("http://http.servicemix.org/Test", "ConsumerInOut"));
        container.activateComponent(asReceiver);
       
        // Add the http invoker
View Full Code Here

TOP

Related Classes of org.apache.servicemix.components.util.EchoComponent

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.