Examples of BindingFactoryManager


Examples of org.apache.cxf.binding.BindingFactoryManager

        sf.setProviders(providers);
    sf.setResourceClasses(UnpackerResource.class);
    sf.setResourceProvider(UnpackerResource.class,
        new SingletonResourceProvider(new UnpackerResource()));
    sf.setAddress(endPoint + "/");
    BindingFactoryManager manager = sf.getBus().getExtension(
        BindingFactoryManager.class);
    JAXRSBindingFactory factory = new JAXRSBindingFactory();
    factory.setBus(sf.getBus());
    manager.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID,
        factory);
    server = sf.create();
  }
View Full Code Here

Examples of org.apache.cxf.binding.BindingFactoryManager

        TikaVersion.class,
        new SingletonResourceProvider(new TikaVersion())
    );
    sf.setAddress(endPoint + "/");

    BindingFactoryManager manager = sf.getBus().getExtension(
        BindingFactoryManager.class
    );

    JAXRSBindingFactory factory = new JAXRSBindingFactory();
    factory.setBus(sf.getBus());

    manager.registerBindingFactory(
        JAXRSBindingFactory.JAXRS_BINDING_ID,
        factory
    );

    server = sf.create();
View Full Code Here

Examples of org.apache.cxf.binding.BindingFactoryManager

      providers.add(new SingletonResourceProvider(new TikaResource()));
      providers.add(new SingletonResourceProvider(new UnpackerResource()));
      providers.add(new SingletonResourceProvider(new TikaVersion()));
      sf.setProviders(providers);
      sf.setAddress("http://" + host + ":" + port + "/");
      BindingFactoryManager manager = sf.getBus().getExtension(
        BindingFactoryManager.class);
      JAXRSBindingFactory factory = new JAXRSBindingFactory();
      factory.setBus(sf.getBus());
      manager.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID,
        factory);
      sf.create();
      logger.info("Started");
    } catch (Exception ex) {
      logger.fatal("Can't start", ex);
View Full Code Here

Examples of org.apache.cxf.binding.BindingFactoryManager

    JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
    sf.setResourceClasses(TikaResource.class);
    sf.setResourceProvider(TikaResource.class,
        new SingletonResourceProvider(new TikaResource()));
    sf.setAddress(endPoint + "/");
    BindingFactoryManager manager = sf.getBus().getExtension(
        BindingFactoryManager.class);
    JAXRSBindingFactory factory = new JAXRSBindingFactory();
    factory.setBus(sf.getBus());
    manager.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID,
        factory);
    server = sf.create();
  }
View Full Code Here

Examples of org.apache.cxf.binding.BindingFactoryManager

        OperationInfo coi = addCancelOperation(ii, namespace, ns);
       
        si.setInterface(ii);
        service = new ServiceImpl(si);
       
        BindingFactoryManager bfm = bus.getExtension(BindingFactoryManager.class);
        BindingFactory bindingFactory = bfm.getBindingFactory(soapVersion);
        BindingInfo bi = bindingFactory.createBindingInfo(service,
                                                          soapVersion, null);
        si.addBinding(bi);
        if (transportId == null) {
            ConduitInitiatorManager cim = bus.getExtension(ConduitInitiatorManager.class);
View Full Code Here

Examples of org.apache.cxf.binding.BindingFactoryManager

        super.setServiceName(name);
        serviceFactory.setServiceName(name);
    }
   
    private void checkBindingFactory(Bus bus) {
        BindingFactoryManager bfm = bus.getExtension(BindingFactoryManager.class);
        try {
            bfm.getBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID);
        } catch (Throwable b) {
            //not registered, let's register one
            bfm.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID,
                                       new JAXRSBindingFactory(bus));
        }
    }
View Full Code Here

Examples of org.apache.cxf.binding.BindingFactoryManager

        return ei;
    }

    protected BindingInfo createBindingInfo() {
        BindingFactoryManager mgr = getBus().getExtension(BindingFactoryManager.class);
        String binding = getBindingId();
        BindingConfiguration bindingConfig = getBindingConfig();

        if (binding == null && bindingConfig != null) {
            binding = bindingConfig.getBindingId();
        }

        if (binding == null) {
            binding = JAXRSBindingFactory.JAXRS_BINDING_ID;
        }

        try {
            BindingFactory bindingFactory = mgr.getBindingFactory(binding);
            setBindingFactory(bindingFactory);
            BindingInfo bi = bindingFactory.createBindingInfo(serviceFactory.getService(),
                                                              binding, bindingConfig);
            for (BindingOperationInfo boi : bi.getOperations()) {
                serviceFactory.sendEvent(FactoryBeanListener.Event.BINDING_OPERATION_CREATED, bi, boi, null);
View Full Code Here

Examples of org.apache.cxf.binding.BindingFactoryManager

   
    protected void setUp() throws Exception {
        super.setUp();

        bus = BusFactory.newInstance().getDefaultBus();             
        BindingFactoryManager bfm = bus.getExtension(BindingFactoryManager.class);       
        factory = (BindingFactory)bfm.getBindingFactory("http://schemas.apache.org/yoko/bindings/corba");
        bfm.registerBindingFactory(CorbaConstants.NU_WSDL_CORBA, factory);       

        java.util.Properties props = System.getProperties();
        props.put("org.omg.CORBA.ORBClass", "org.apache.yoko.orb.CORBA.ORB");
        props.put("org.omg.CORBA.ORBSingletonClass", "org.apache.yoko.orb.CORBA.ORBSingleton");
        props.put("yoko.orb.id", "Yoko-Server-Binding");
View Full Code Here

Examples of org.apache.cxf.binding.BindingFactoryManager

    }

    protected void createEndpoints() {
        Service service = getService();

        BindingFactoryManager bfm = getBus().getExtension(BindingFactoryManager.class);

        for (ServiceInfo inf : service.getServiceInfos()) {
            for (EndpointInfo ei : inf.getEndpoints()) {

                for (BindingOperationInfo boi : ei.getBinding().getOperations()) {
                    updateBindingOperation(boi);
                }
                try {
                    bfm.getBindingFactory(ei.getBinding().getBindingId());
                } catch (BusException e1) {
                    continue;
                }

                try {
View Full Code Here

Examples of org.apache.cxf.binding.BindingFactoryManager

    }

    protected void createEndpoints() {
        Service service = getService();

        BindingFactoryManager bfm = getBus().getExtension(BindingFactoryManager.class);

        for (ServiceInfo inf : service.getServiceInfos()) {
            for (EndpointInfo ei : inf.getEndpoints()) {

                for (BindingOperationInfo boi : ei.getBinding().getOperations()) {
                    updateBindingOperation(boi);
                }
                try {
                    bfm.getBindingFactory(ei.getBinding().getBindingId());
                } catch (BusException e1) {
                    continue;
                }

                try {
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.