use of org.apache.cxf.transport.jms.JMSTransportFactory in project tesb-rt-se by Talend.
the class RequestCallbackJmsTest method initialize.
@Before
public void initialize() throws Exception {
if (mep == NO_RUN) {
return;
}
final Bus bus = BusFactory.getDefaultBus();
final JMSTransportFactory jmsTransport = new JMSTransportFactory();
final DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
dfm.registerDestinationFactory("http://schemas.xmlsoap.org/soap/http", jmsTransport);
dfm.registerDestinationFactory("http://schemas.xmlsoap.org/soap/jms", jmsTransport);
dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/http", jmsTransport);
dfm.registerDestinationFactory("http://cxf.apache.org/bindings/xformat", jmsTransport);
final ConduitInitiatorManager extension = bus.getExtension(ConduitInitiatorManager.class);
extension.registerConduitInitiator("http://schemas.xmlsoap.org/wsdl/soap/http", jmsTransport);
extension.registerConduitInitiator("http://schemas.xmlsoap.org/soap/http", jmsTransport);
extension.registerConduitInitiator("http://schemas.xmlsoap.org/soap/jms", jmsTransport);
extension.registerConduitInitiator("http://cxf.apache.org/bindings/xformat", jmsTransport);
final WSDLServiceFactory wsdlSvcFactory = new WSDLServiceFactory(CXFBusFactory.getThreadDefaultBus(), wsdlLocation);
final org.apache.cxf.service.Service cxfService = wsdlSvcFactory.create();
final ServiceInfo si = findServiceByName(cxfService, serviceName);
if (si == null) {
throw new RuntimeException("WSDL does not contain service " + serviceName);
}
final EndpointInfo ei = findEndpoint(si, portName);
if (ei == null) {
throw new RuntimeException("WSDL does not contain port " + portName);
}
endpointInfo = ei;
callbackMap.put("seekBookInBasementResponse", new SeekBookInBasementResponseCallback(messageTransfer));
callbackMap.put("seekBookInBasementFault", new SeekBookInBasementFaultCallback(messageTransfer));
}
Aggregations