use of org.talend.esb.mep.requestcallback.sample.internal.SeekBookInBasementResponseCallback 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));
}
use of org.talend.esb.mep.requestcallback.sample.internal.SeekBookInBasementResponseCallback in project tesb-rt-se by Talend.
the class RequestCallbackTest method initialize.
@Before
public void initialize() throws Exception {
if (mep == NO_RUN) {
return;
}
final Bus bus = BusFactory.getDefaultBus();
final LocalTransportFactory localTransport = new LocalTransportFactory();
final DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
dfm.registerDestinationFactory("http://schemas.xmlsoap.org/soap/http", localTransport);
dfm.registerDestinationFactory("http://schemas.xmlsoap.org/soap/jms", localTransport);
dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/http", localTransport);
dfm.registerDestinationFactory("http://cxf.apache.org/bindings/xformat", localTransport);
dfm.registerDestinationFactory("http://cxf.apache.org/transports/local", localTransport);
final ConduitInitiatorManager extension = bus.getExtension(ConduitInitiatorManager.class);
extension.registerConduitInitiator("http://cxf.apache.org/transports/local", localTransport);
extension.registerConduitInitiator("http://schemas.xmlsoap.org/wsdl/soap/http", localTransport);
extension.registerConduitInitiator("http://schemas.xmlsoap.org/soap/http", localTransport);
extension.registerConduitInitiator("http://schemas.xmlsoap.org/soap/jms", localTransport);
extension.registerConduitInitiator("http://cxf.apache.org/bindings/xformat", localTransport);
final WSDLServiceFactory wsdlSvcFactory = new WSDLServiceFactory(CXFBusFactory.getThreadDefaultBus(), wsdlLocation, SERVICE_NAME);
final org.apache.cxf.service.Service cxfService = wsdlSvcFactory.create();
final ServiceInfo si = findServiceByName(cxfService, SERVICE_NAME);
if (si == null) {
throw new RuntimeException("WSDL does not contain service " + SERVICE_NAME);
}
final EndpointInfo ei = findEndpoint(si, PORT_NAME);
if (ei == null) {
throw new RuntimeException("WSDL does not contain port " + PORT_NAME);
}
endpointInfo = ei;
callbackMap.put("seekBookInBasementResponse", new SeekBookInBasementResponseCallback(messageTransfer));
callbackMap.put("seekBookInBasementFault", new SeekBookInBasementFaultCallback(messageTransfer));
}
Aggregations