use of org.apache.cxf.jca.cxf.ManagedConnectionFactoryImpl in project cxf by apache.
the class OutBoundConnectionTest method testGetConnectionFromSEI.
@Test
@org.junit.Ignore
public void testGetConnectionFromSEI() throws Exception {
CXFConnectionRequestInfo requestInfo = new CXFConnectionRequestInfo();
requestInfo.setInterface(Greeter.class);
requestInfo.setAddress("http://localhost:" + PORT + "/SoapContext/SoapPort");
ManagedConnectionFactory factory = new ManagedConnectionFactoryImpl();
ManagedConnection mc = factory.createManagedConnection(null, requestInfo);
Object client = mc.getConnection(null, requestInfo);
verifyResult(client);
}
use of org.apache.cxf.jca.cxf.ManagedConnectionFactoryImpl in project cxf by apache.
the class OutBoundConnectionTest method testBasicConnection.
@Test
@org.junit.Ignore
public void testBasicConnection() throws Exception {
URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
assertNotNull(wsdl);
SOAPService service = new SOAPService(wsdl, serviceName);
assertNotNull(service);
CXFConnectionRequestInfo cri = new CXFConnectionRequestInfo(Greeter.class, wsdl, service.getServiceName(), portName);
cri.setAddress("http://localhost:" + PORT + "/SoapContext/SoapPort");
ManagedConnectionFactory managedFactory = new ManagedConnectionFactoryImpl();
Subject subject = new Subject();
ManagedConnection mc = managedFactory.createManagedConnection(subject, cri);
Object o = mc.getConnection(subject, cri);
// test for the Object hash()
try {
o.hashCode();
o.toString();
} catch (WebServiceException ex) {
fail("The connection object should support Object method");
}
verifyResult(o);
}
use of org.apache.cxf.jca.cxf.ManagedConnectionFactoryImpl in project cxf by apache.
the class ProxyInvocationHandler method invoke.
public final Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
LOG.fine(this + " on " + method);
Object o = getData().getManagedConnection().getManagedConnectionFactory();
ManagedConnectionFactoryImpl mcf = (ManagedConnectionFactoryImpl) o;
// NOTE reset the inited bus to current ,so CXF-rt can play with JCA setup bus
Bus bus = mcf.getBus();
BusFactory.setDefaultBus(bus);
return invokeNext(proxy, method, args);
}
Aggregations