org.apache.cxf.connector
Interface CXFConnectionFactory

All Known Implementing Classes:
ConnectionFactoryImpl

public interface CXFConnectionFactory

Provides methods to create a Connection object that represents a Web service defined from the supplied parameters. This interface is returned from an environment naming context lookup by a J2EE component.


Method Summary
 java.lang.Object getBus()
          Returns the underlying Bus for this connection factory.
 java.lang.Object getConnection(java.lang.Class iface, javax.xml.namespace.QName serviceName)
          Creates a client proxy based on the given WSDL information.
 java.lang.Object getConnection(java.lang.Class iface, javax.xml.namespace.QName serviceName, javax.xml.namespace.QName portName)
          Creates a client proxy based on the given WSDL information.
 java.lang.Object getConnection(java.lang.Class iface, java.net.URL wsdlLocation, javax.xml.namespace.QName serviceName)
          Creates a client proxy based on the given WSDL information.
 java.lang.Object getConnection(java.lang.Class iface, java.net.URL wsdlLocation, javax.xml.namespace.QName serviceName, javax.xml.namespace.QName portName)
          Creates a client proxy based on the given WSDL information.
 

Method Detail

getConnection

java.lang.Object getConnection(java.lang.Class iface,
                               java.net.URL wsdlLocation,
                               javax.xml.namespace.QName serviceName,
                               javax.xml.namespace.QName portName)
                               throws javax.resource.ResourceException
Creates a client proxy based on the given WSDL information.

Parameters:
iface - The interface class implemented by the returned proxy.
wsdlLocation - The URL to the WSDL that defines the service.
serviceName - The QName that identifies the service.
portName - The port to connect to; services may include multiple ports.
Returns:
a proxy object that implements both the given iface and the Connection interface. It represents the Web service associated with the specified service and port.
Throws:
javax.resource.ResourceException - If there is an error creating the connection.

getConnection

java.lang.Object getConnection(java.lang.Class iface,
                               java.net.URL wsdlLocation,
                               javax.xml.namespace.QName serviceName)
                               throws javax.resource.ResourceException
Creates a client proxy based on the given WSDL information. If the service contains more than one port the first one will be used.

Parameters:
iface - The interface class implemented by the returned proxy.
wsdlLocation - The URL to the WSDL that defines the service.
serviceName - The QName that identifies the service.
Returns:
A proxy object that implements both the given iface and the Connection interface. It represents the Web service associated with the specified service.
Throws:
javax.resource.ResourceException - If there is an error creating the connection.

getConnection

java.lang.Object getConnection(java.lang.Class iface,
                               javax.xml.namespace.QName serviceName,
                               javax.xml.namespace.QName portName)
                               throws javax.resource.ResourceException
Creates a client proxy based on the given WSDL information. The WSDL location will be obtained from Bus configuration using the serviceName.

Parameters:
iface - The interface class implemented by the returned proxy.
serviceName - The QName that identifies the service.
portName - The port to connect to; services may include multiple ports.
Returns:
A proxy object that implements both the given iface and the Connection interface. It represents the Web service associated with the specified service and port.
Throws:
javax.resource.ResourceException - If there is an error creating the connection.

getConnection

java.lang.Object getConnection(java.lang.Class iface,
                               javax.xml.namespace.QName serviceName)
                               throws javax.resource.ResourceException
Creates a client proxy based on the given WSDL information. If the service contains more than one port the first one will be used as no port name is passed. The WSDL location will be obtained from Bus configuration using the serviceName.

Parameters:
iface - The interface class implemented by the returned proxy.
serviceName - The QName that identifies the service..
Returns:
A proxy object that implements both the given iface and the Connection interface. It represents the Web service associated with the specified service.
Throws:
javax.resource.ResourceException - If there is an error creating the connection.

getBus

java.lang.Object getBus()
Returns the underlying Bus for this connection factory. In some J2EE environments, for example Weblogic, the Bus and dependent classes are not available to the J2EE application. In this case the CXF runtime jar: cxf-install-dir/cxf/lib/cxf-rt-version.jar should be added to the classpath of the application server. Once, the Bus class is available on the system classpath, then the returned object may be cast to Bus. In other environments, this cast should be safe without having to modify the classpath org.apache.cxf.Bus = (org.apache.cxf.Bus)connectionFactory.getBus();

Returns:
the connection factory&s Bus


Copyright © 2006 Apache Software Foundation. All Rights Reserved.