Using CXF-JCA RAR in Application ServerPage edited by Christian SchneiderDeploy CXF-JCA RAR.cxf-integration-jca module has implemented the JCA1.5 outbound connection. You can see samples in $CXF_HOME/samples/integration/jca. Build CXF-JCA RARThe jca rar package structure would be: |---META-INF
|---META-INF/ra.xml
|---cxf-api-2.1.jar
|---cxf-integration-jca-2.1.jar
|---.....
Deploy RAR to Weblogic.(Note: this has been tested against WebLogic9.1) Package RAR in an EAR.
Deploy RAR to WebSphere.TBD Using JCA Connection.Get Connection from ManagedConnectionFactory.Below is the code snippet to get the Connection.
URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
CXFConnectionRequestInfo cri = new CXFConnectionRequestInfo(Greeter.class,
wsdl,
serviceName,
portName);
ManagedConnectionFactory managedFactory = new ManagedConnectionFactoryImpl();
Subject subject = new Subject();
ManagedConnection mc = managedFactory.createManagedConnection(subject, cri);
Object o = mc.getConnection(subject, cri);
Also can get the connection without wsdl, but you need to provide the address.
CXFConnectionRequestInfo requestInfo = new CXFConnectionRequestInfo();
requestInfo.setInterface(Greeter.class);
requestInfo.setAddress("http://localhost:9000/SoapContext/SoapPort");
ManagedConnectionFactory factory = new ManagedConnectionFactoryImpl();
ManagedConnection mc = factory.createManagedConnection(null, requestInfo);
Object client = mc.getConnection(null, requestInfo);
Using CXF-JCA RAR to access the Stateless Session Bean.By using cxf-jca RAR, the EIS is able to access the Stateless Session Bean by CXF Interal API or JAXWS API. Activate the ejb_servant.properties file.
# Format:
# jndi_name={namespace}servicen...@url_to_swdl
#
# jndi_name: The JNDI name that an external client uses to contact the bean.
# ServiceName: The string form of the QName for the Artix service in the WSDL file.
# @url_to_wsdl: The string form of a URL that identifies the WSDL file.
#
# Example:
# GreeterBean={http://apache.org/hello_world_soap_http}gree...@file:c:/wsdl/hello_world.wsdl
Change Notification Preferences
View Online
|
View Change
|
Add Comment
|
