Package org.objectweb.celtix.configuration

Examples of org.objectweb.celtix.configuration.Configuration


    public Configuration getConfiguration(String namespaceUri, String id, Configuration parent) {
        if (parent == null) {
            return null;
        }

        Configuration c = parent.getChild(namespaceUri, id);
        if (null == c && null == getModel(namespaceUri)) {
            throw new ConfigurationException(new Message("UNKNOWN_NAMESPACE_EXC", BUNDLE, namespaceUri));
        }
        return c;
    }
View Full Code Here


            transportFactoryManagerImplNew);
    }

    private TransportFactoryManagerImpl createTransportFactory() throws BusException {
        Bus bus = EasyMock.createMock(Bus.class);
        Configuration bc = EasyMock.createMock(Configuration.class);

        ObjectFactory of = new ObjectFactory();
        ClassNamespaceMappingListType mappings = of.createClassNamespaceMappingListType();
        bus.getConfiguration();
        EasyMock.expectLastCall().andReturn(bc);
        bc.getObject("transportFactories");
        EasyMock.expectLastCall().andReturn(mappings);
        EasyMock.replay(bus);
        EasyMock.replay(bc);

        return new TransportFactoryManagerImpl(bus);
View Full Code Here

public class ServiceImplTest extends TestCase {

    public void testHandlerResolverAttribute() {
        QName sn = new QName("http://objectweb.org/hello_world_soap_http", "Greeter");
        Bus bus = org.easymock.classextension.EasyMock.createMock(CeltixBus.class);
        Configuration bc = EasyMock.createMock(Configuration.class);
        bus.getConfiguration();
        org.easymock.classextension.EasyMock.expectLastCall().andReturn(bc);
        bc.getChild(ServiceImpl.PORT_CONFIGURATION_URI, sn.toString());
        EasyMock.expectLastCall().andReturn(null);
        WorkQueueManager wm = EasyMock.createMock(WorkQueueManager.class);
        bus.getWorkQueueManager();
        EasyMock.expectLastCall().andReturn(wm);
        wm.getAutomaticWorkQueue();
View Full Code Here


    public void testCtorWithBus() throws Exception {
       
        Bus bus = EasyMock.createMock(Bus.class);
        Configuration conf = EasyMock.createMock(Configuration.class);
       
        StringListType resolverList = new StringListType();
        resolverList.getItem().add(ClassLoaderResolver.class.getName());
        resolverList.getItem().add(ClasspathResolver.class.getName());

        new ClassLoaderResolver();

        bus.getConfiguration();
        EasyMock.expectLastCall().andReturn(conf);
        conf.getObject("resourceResolvers");
        EasyMock.expectLastCall().andReturn(resolverList);

        EasyMock.replay(bus);
        EasyMock.replay(conf);
View Full Code Here

                          String portName) throws WSDLException,
                          IOException, BusException {
        assert bus != null;
        EndpointReferenceType ref = EndpointReferenceUtils.getEndpointReference(wsdlUrl, serviceName,
                                                                                portName);
        Configuration busCfg = bus.getConfiguration();
        assert null != busCfg;
        String id = EndpointReferenceUtils.getServiceName(ref).toString();
        ConfigurationBuilder cb = ConfigurationBuilderFactory.getBuilder(null);
        cb.buildConfiguration(JMSConstants.ENDPOINT_CONFIGURATION_URI, id, busCfg);
        cb.buildConfiguration(JMSConstants.PORT_CONFIGURATION_URI,
View Full Code Here

                                                                           delay,
                                                                           buffer,
                                                                           oneWay,
                                                                           decoupled);
        EasyMock.reset(bus);
        Configuration bc = EasyMock.createMock(Configuration.class);
        bus.getConfiguration();
        EasyMock.expectLastCall().andReturn(bc);
        server.activate(callback);
    }
View Full Code Here

                                                 boolean decoupled) throws Exception {
        if (decoupled) {
            if (initial) {
                assertFalse(((HTTPClientTransport)client).hasDecoupledEndpoint());
                EasyMock.reset(bus);
                Configuration lc = EasyMock.createMock(Configuration.class);
                bus.getConfiguration();
                EasyMock.expectLastCall().andReturn(lc);
                EasyMock.replay(bus);
                EasyMock.reset(clientBinding);
                clientBinding.createResponseCallback();
View Full Code Here

        }
    }

    private HTTPTransportFactory createTransportFactory() throws BusException {
        EasyMock.reset(bus);
        Configuration bc = EasyMock.createMock(Configuration.class);

        String transportId = "http://celtix.objectweb.org/transports/http/configuration";
        ObjectFactory of = new ObjectFactory();
        ClassNamespaceMappingListType mappings = of.createClassNamespaceMappingListType();
        ClassNamespaceMappingType mapping = of.createClassNamespaceMappingType();
        mapping.setClassname("org.objectweb.celtix.bus.transports.http.HTTPTransportFactory");
        mapping.getNamespace().add(transportId);
        mappings.getMap().add(mapping);

        bus.getWSDLManager();
        EasyMock.expectLastCall().andReturn(wsdlManager);
        bus.getWSDLManager();
        EasyMock.expectLastCall().andReturn(wsdlManager);
        bus.getWSDLManager();
        EasyMock.expectLastCall().andReturn(wsdlManager);

        BusLifeCycleManager lifecycleManager = EasyMock.createNiceMock(BusLifeCycleManager.class);
        bus.getLifeCycleManager();
        EasyMock.expectLastCall().andReturn(lifecycleManager);
        bus.getConfiguration();
        EasyMock.expectLastCall().andReturn(bc);
        bc.getObject("transportFactories");
        EasyMock.expectLastCall().andReturn(mappings);
        // check the transportFactoryManager create event
        checkBusCreatedEvent();
        EasyMock.replay(bus);
        EasyMock.replay(bc);
View Full Code Here

                                                  String address,
                                                  boolean decoupled)
        throws WSDLException, IOException {
        EasyMock.reset(bus);

        Configuration bc = EasyMock.createMock(Configuration.class);
        Configuration pc = EasyMock.createMock(Configuration.class);

        bus.getConfiguration();
        EasyMock.expectLastCall().andReturn(bc);
        String id = serviceName.toString() + "/" + portName;
        bc.getChild("http://celtix.objectweb.org/bus/jaxws/port-config", id);
        EasyMock.expectLastCall().andReturn(pc);
        pc.getChild("http://celtix.objectweb.org/bus/transports/http/http-client-config", "http-client");
        EasyMock.expectLastCall().andReturn(null);
        bus.getWSDLManager();
        EasyMock.expectLastCall().andReturn(wsdlManager);
        pc.getString("address");
        EasyMock.expectLastCall().andReturn(address);

        checkBusCreatedEvent();

        EasyMock.replay(bus);
View Full Code Here

        URL url = new URL(address);
       
        EasyMock.reset(bus);

        Configuration bc = EasyMock.createMock(Configuration.class);
        Configuration ec = EasyMock.createMock(Configuration.class);

        bus.getConfiguration();
        EasyMock.expectLastCall().andReturn(bc);
        bc.getChild("http://celtix.objectweb.org/bus/jaxws/endpoint-config", serviceName.toString());
        EasyMock.expectLastCall().andReturn(ec);
        ec.getChild("http://celtix.objectweb.org/bus/transports/http/http-server-config", "http-server");
        EasyMock.expectLastCall().andReturn(null);
        bus.getWSDLManager();
        EasyMock.expectLastCall().andReturn(wsdlManager);
        if (first) {
            //first call will configure the port listener
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.configuration.Configuration

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.