Package org.switchyard.component.http.config.model

Examples of org.switchyard.component.http.config.model.ProxyModel


        // Service consumer or Reference binding
        OutboundHandler httpProxyOutbound1 = new OutboundHandler(config, null);
        httpProxyOutbound1.start();
        _domain.registerService(_proxyConsumerService1.getServiceName(), new HelloWebServiceInterface(), httpProxyOutbound1);

        ProxyModel proxy = new V1ProxyModel(HttpNamespace.DEFAULT.uri());
        proxy.setHost(host);
        proxy.setPort("" + PROXYPORT);
        config.setProxyConfig(proxy);
        config.setAddress("http://" + host + ":" + port + "/http");
        config.setServiceName(_proxyConsumerService2.getServiceName());

        // Service consumer or Reference binding
        OutboundHandler httpProxyOutbound2 = new OutboundHandler(config, null);
        httpProxyOutbound2.start();
        _domain.registerService(_proxyConsumerService2.getServiceName(), new HelloWebServiceInterface(), httpProxyOutbound2);

        proxy.setUser(PROXY_USER);
        proxy.setPassword(PROXY_PWD);
        config.setProxyConfig(proxy);
        config.setServiceName(_proxyConsumerService3.getServiceName());

        // Service consumer or Reference binding
        OutboundHandler httpProxyOutbound3 = new OutboundHandler(config, null);
View Full Code Here


    @Test
    public void proxyConfigBinding() throws Exception {
        ModelPuller<HttpBindingModel> puller = new ModelPuller<HttpBindingModel>();
        HttpBindingModel model = puller.pull(HTTP_BINDING_PROXY, getClass());
        Assert.assertTrue(model.isModelValid());
        ProxyModel proxyConfig = model.getProxyConfig();
        Assert.assertNotNull(proxyConfig);
        Assert.assertEquals("host", proxyConfig.getHost());
        Assert.assertEquals("8090", proxyConfig.getPort());
        Assert.assertEquals("Beal", proxyConfig.getUser());
        Assert.assertEquals("conjecture", proxyConfig.getPassword());
    }
View Full Code Here

TOP

Related Classes of org.switchyard.component.http.config.model.ProxyModel

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.