Search in sources :

Example 1 with CXFConnectionRequestInfo

use of org.apache.cxf.jca.cxf.CXFConnectionRequestInfo 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);
}
Also used : ManagedConnectionFactory(javax.resource.spi.ManagedConnectionFactory) CXFConnectionRequestInfo(org.apache.cxf.jca.cxf.CXFConnectionRequestInfo) ManagedConnectionFactoryImpl(org.apache.cxf.jca.cxf.ManagedConnectionFactoryImpl) ManagedConnection(javax.resource.spi.ManagedConnection) Test(org.junit.Test)

Example 2 with CXFConnectionRequestInfo

use of org.apache.cxf.jca.cxf.CXFConnectionRequestInfo 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);
}
Also used : SOAPService(org.apache.hello_world_soap_http.SOAPService) ManagedConnectionFactory(javax.resource.spi.ManagedConnectionFactory) WebServiceException(javax.xml.ws.WebServiceException) CXFConnectionRequestInfo(org.apache.cxf.jca.cxf.CXFConnectionRequestInfo) ManagedConnectionFactoryImpl(org.apache.cxf.jca.cxf.ManagedConnectionFactoryImpl) ManagedConnection(javax.resource.spi.ManagedConnection) URL(java.net.URL) Subject(javax.security.auth.Subject) Test(org.junit.Test)

Example 3 with CXFConnectionRequestInfo

use of org.apache.cxf.jca.cxf.CXFConnectionRequestInfo in project cxf by apache.

the class CXFConnectionParam method equals.

public boolean equals(java.lang.Object other) {
    boolean result = false;
    if (other instanceof CXFConnectionRequestInfo) {
        CXFConnectionRequestInfo cri = (CXFConnectionRequestInfo) other;
        result = areEquals(iface, cri.getInterface()) && areEquals(wsdlLocation, cri.getWsdlLocation()) && areEquals(serviceName, cri.getServiceName()) && areEquals(portName, cri.getPortName()) && areEquals(address, cri.getAddress());
    }
    return result;
}
Also used : CXFConnectionRequestInfo(org.apache.cxf.jca.cxf.CXFConnectionRequestInfo)

Aggregations

CXFConnectionRequestInfo (org.apache.cxf.jca.cxf.CXFConnectionRequestInfo)3 ManagedConnection (javax.resource.spi.ManagedConnection)2 ManagedConnectionFactory (javax.resource.spi.ManagedConnectionFactory)2 ManagedConnectionFactoryImpl (org.apache.cxf.jca.cxf.ManagedConnectionFactoryImpl)2 Test (org.junit.Test)2 URL (java.net.URL)1 Subject (javax.security.auth.Subject)1 WebServiceException (javax.xml.ws.WebServiceException)1 SOAPService (org.apache.hello_world_soap_http.SOAPService)1