Examples of BindingFactory


Examples of org.apache.tapestry5.services.BindingFactory

    private final StringInterner interner = new StringInternerImpl();

    @Test
    public void expression_has_no_prefix()
    {
        BindingFactory factory = mockBindingFactory();
        Binding binding = mockBinding();
        ComponentResources container = mockComponentResources();
        ComponentResources component = mockComponentResources();
        Location l = mockLocation();
View Full Code Here

Examples of org.apache.tapestry5.services.BindingFactory

    }

    @Test
    public void expression_prefix_not_in_configuration()
    {
        BindingFactory factory = mockBindingFactory();
        Binding binding = mockBinding();
        ComponentResources container = mockComponentResources();
        ComponentResources component = mockComponentResources();
        Location l = mockLocation();
View Full Code Here

Examples of org.apache.tapestry5.services.BindingFactory

    }

    @Test
    public void known_prefix()
    {
        BindingFactory factory = mockBindingFactory();
        Binding binding = mockBinding();
        ComponentResources container = mockComponentResources();
        ComponentResources component = mockComponentResources();
        Location l = mockLocation();
View Full Code Here

Examples of org.apache.tapestry5.services.BindingFactory

    }

    @Test
    public void factory_throws_exception()
    {
        BindingFactory factory = mockBindingFactory();
        ComponentResources container = mockComponentResources();
        ComponentResources component = mockComponentResources();
        Location l = mockLocation();
        Throwable t = new RuntimeException("Simulated failure.");

        String defaultPrefix = "def";
        String description = "descrip";
        String expression = "full expression";

        factory.newBinding(description, container, component, expression, l);
        setThrowable(t);

        replay();

        Map<String, BindingFactory> map = newMap();
View Full Code Here

Examples of org.apache.tapestry5.services.BindingFactory

        // Location might be null

        String subexpression = expression;
        int colonx = expression.indexOf(':');

        BindingFactory factory = null;

        if (colonx > 0)
        {
            String prefix = expression.substring(0, colonx);

            factory = factories.get(prefix);
            if (factory != null)
                subexpression = expression.substring(colonx + 1);
        }

        if (factory == null)
            factory = factories.get(defaultPrefix);

        // And if that's null, what then? We assume that the default prefix is a valid prefix,
        // or we'll get an NPE below and report it like any other error.

        try
        {
            return factory.newBinding(interner.intern(description), container, component, subexpression, location);
        } catch (Exception ex)
        {
            throw new TapestryException(String.format("Could not convert '%s' into a component parameter binding: %s", expression, InternalUtils.toMessage(ex)), location, ex);
        }
    }
View Full Code Here

Examples of org.codehaus.preon.binding.BindingFactory

    private ObjectCodecFactory objectCodecFactory;

    @Before
    public void setUp() {
        factory = new CompoundCodecFactory();
        BindingFactory bindingFactory = new StandardBindingFactory();
        bindingFactory = new ConditionalBindingFactory(bindingFactory);
        objectCodecFactory = new ObjectCodecFactory(factory, bindingFactory);
        factory.add(new NumericCodec.Factory());
        factory.add(new ListCodecFactory(factory));
        factory.add(objectCodecFactory);
View Full Code Here

Examples of org.geotools.xml.BindingFactory

        // setup the namespace support
        context.registerComponentInstance(namespaces);
        context.registerComponentInstance(new NamespaceSupportWrapper(namespaces));

        // binding factory support
        BindingFactory bindingFactory = new BindingFactoryImpl(bindingLoader);
        context.registerComponentInstance(bindingFactory);

        // binding walker support
        BindingWalkerFactoryImpl bwFactory = new BindingWalkerFactoryImpl(bindingLoader, context);
        context.registerComponentInstance(bwFactory);
View Full Code Here

Examples of org.objectweb.celtix.bindings.BindingFactory

    private  ClientBinding createClientBinding() {
        // TODO: Get bindingId from wsdl via the ref
        String bindingId = "http://schemas.xmlsoap.org/wsdl/soap/";
        ClientBinding binding = null;
        try {
            BindingFactory factory = bus.getBindingManager().getBindingFactory(bindingId);
            assert factory != null : "unable to find binding factory for " + bindingId;
            binding = factory.createClientBinding(ref);
        } catch (Exception ex) {
            throw new WebServiceException(ex);
        }
        return binding;
    }
View Full Code Here

Examples of org.objectweb.celtix.bindings.BindingFactory

        ClientBinding binding = null;
        try {
           
            String bindingId = c.getString("bindingId");
            BindingFactory factory = bus.getBindingManager().getBindingFactory(bindingId);
            assert factory != null : "unable to find binding factory for " + bindingId;
            binding = factory.createClientBinding(ref);
        } catch (Exception ex) {
            throw new WebServiceException(ex);
        }
       
        binding.configureSystemHandlers(c);
View Full Code Here

Examples of org.objectweb.celtix.bindings.BindingFactory

        junit.textui.TestRunner.run(SoapBindingFactoryTest.class);
    }
   
    public void testCreateClientBinding() throws Exception {
        Bus bus = Bus.init(new String[0]);
        BindingFactory factory =
            bus.getBindingManager().getBindingFactory(
                "http://schemas.xmlsoap.org/wsdl/soap/");
        assertNotNull(factory);
       
        URL url = getClass().getClassLoader().getResource(".");
        URL wsdlUrl = new URL(url, "../classes-tests/wsdl/hello_world.wsdl");
        assertNotNull(wsdlUrl);
        QName serviceName = new QName("http://objectweb.org/hello_world_soap_http", "SOAPService");
        EndpointReferenceType address = EndpointReferenceUtils
            .getEndpointReference(wsdlUrl, serviceName, "SoapPort");
       
        ClientBinding clientBinding = factory.createClientBinding(address);
        assertNotNull(clientBinding);
        assertTrue(SOAPClientBinding.class.isInstance(clientBinding));
       
        SOAPClientBinding soapClientBinding = (SOAPClientBinding)clientBinding;
        Binding b = soapClientBinding.getBinding();
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.