Hi, The registration code is correct. You need to override AbstractTransportPrefixes.getUriPrefixes() method returning the prefixes of your custom protocol. Your Conduit will be requested from the factory if client tries to access URL with your custom prefix.
Take as a sample JMS or UDP transport factory: https://github.com/apache/cxf/blob/master/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSTransportFactory.java Regards, Andrei. > -----Original Message----- > From: tho huynh ngoc [mailto:[email protected]] > Sent: Donnerstag, 23. Juni 2016 17:10 > To: [email protected] > Subject: custom conduit CXF > > I set a CustomConduitFactory as following > > factory = new JaxWsProxyFactoryBean(); > factory.setServiceClass(Service.class); > > > Bus bus = BusFactory.getThreadDefaultBus(); > MyConduitFactory customTransport = new MyConduitFactory(); > //described as UDPTransportFactory > ConduitInitiatorManager extension = > bus.getExtension(ConduitInitiatorManager.class); > extension.registerConduitInitiator(MyConduitFactory.TRANSPORT_ID, > customTransport); > > factory.setConduitSelector(customTransport); > factory.setAddress(address); > client = (Service)factory.create(); > client.send("hi"); > > It does not work ? > > How to declare a custom conduit in CXF client, please ? > > I tried to implement a class MyConduit extends AbstractConduit. But i do not > how to declare it in the client implementation (see > http://cxf.apache.org/docs/custom-transport.html) > > Regards, > HNT
