org.apache.cxf.frontend
Class ClientProxyFactoryBean

java.lang.Object
  extended by org.apache.cxf.interceptor.AbstractBasicInterceptorProvider
      extended by org.apache.cxf.frontend.ClientProxyFactoryBean
All Implemented Interfaces:
InterceptorProvider
Direct Known Subclasses:
ClientProxyFactoryBeanDefinitionParser.SpringClientProxyFactoryBean, JaxWsProxyFactoryBean

public class ClientProxyFactoryBean
extends AbstractBasicInterceptorProvider

This class will create a client for you which implements the specified service class. Example:

 ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
 factory.setServiceClass(YourServiceInterface.class);
 YourServiceInterface client = (YourServiceInterface) factory.create();
 
To access the underlying Client object:
 Client cxfClient = ClientProxy.getClient(client);
 


Constructor Summary
ClientProxyFactoryBean()
           
ClientProxyFactoryBean(ClientFactoryBean fact)
           
 
Method Summary
protected  ClientProxy clientClientProxy(Client c)
           
 java.lang.Object create()
          Creates a proxy object that can be used to make remote invocations.
 java.lang.String getAddress()
           
 BindingConfiguration getBindingConfig()
           
 java.lang.String getBindingId()
           
 Bus getBus()
           
 ClientFactoryBean getClientFactoryBean()
           
 ConduitSelector getConduitSelector()
           
 DataBinding getDataBinding()
           
 javax.xml.namespace.QName getEndpointName()
           
 java.util.List<AbstractFeature> getFeatures()
           
protected  java.lang.Class[] getImplementingClasses()
           
 java.lang.String getPassword()
           
 java.util.Map<java.lang.String,java.lang.Object> getProperties()
          Returns the property map for the proxy factory.
 java.lang.Class getServiceClass()
           
 ReflectionServiceFactoryBean getServiceFactory()
           
 javax.xml.namespace.QName getServiceName()
          Returns the QName of the WSDL service the proxy implements
 java.lang.String getTransportId()
           
 java.lang.String getUsername()
           
 java.lang.String getWsdlLocation()
           
 java.lang.String getWsdlURL()
           
 void initFeatures()
           
 void setAddress(java.lang.String add)
           
 void setBindingConfig(BindingConfiguration config)
           
 void setBindingId(java.lang.String bind)
           
 void setBus(Bus bus)
           
 void setClientFactoryBean(ClientFactoryBean clientFactoryBean)
           
 void setConduitSelector(ConduitSelector selector)
           
 void setDataBinding(DataBinding dataBinding)
           
 void setEndpointName(javax.xml.namespace.QName endpointName)
           
 void setFeatures(java.util.List<AbstractFeature> f)
           
 void setPassword(java.lang.String password)
           
 void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
          Specifies a set of properties used to configure the proxies provided by the factory.
 void setServiceClass(java.lang.Class serviceClass)
          Specifies the class representing the SEI the proxy implements.
 void setServiceFactory(ReflectionServiceFactoryBean sf)
           
 void setServiceName(javax.xml.namespace.QName serviceName)
          Specifies the QName of the WSDL service the proxy implements.
 void setTransportId(java.lang.String transportId)
           
 void setUsername(java.lang.String username)
           
 void setWsdlLocation(java.lang.String wsdlURL)
          Specifies the URL where the proxy can find the WSDL defining the service the proxy implements.
 void setWsdlURL(java.lang.String wsdlURL)
          Specifies the URL where the proxy can find the WSDL defining the service the proxy implements.
 
Methods inherited from class org.apache.cxf.interceptor.AbstractBasicInterceptorProvider
getInFaultInterceptors, getInInterceptors, getOutFaultInterceptors, getOutInterceptors, setInFaultInterceptors, setInInterceptors, setOutFaultInterceptors, setOutInterceptors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientProxyFactoryBean

public ClientProxyFactoryBean()

ClientProxyFactoryBean

public ClientProxyFactoryBean(ClientFactoryBean fact)
Method Detail

initFeatures

public void initFeatures()

create

public java.lang.Object create()
Creates a proxy object that can be used to make remote invocations.

Returns:
the proxy. You must cast the returned object to the appropriate class before using it.

getImplementingClasses

protected java.lang.Class[] getImplementingClasses()

clientClientProxy

protected ClientProxy clientClientProxy(Client c)

getClientFactoryBean

public ClientFactoryBean getClientFactoryBean()

setClientFactoryBean

public void setClientFactoryBean(ClientFactoryBean clientFactoryBean)

getPassword

public java.lang.String getPassword()

setPassword

public void setPassword(java.lang.String password)

getServiceClass

public java.lang.Class getServiceClass()

setServiceClass

public void setServiceClass(java.lang.Class serviceClass)
Specifies the class representing the SEI the proxy implements.

Parameters:
serviceClass - the SEI's class

getUsername

public java.lang.String getUsername()

setUsername

public void setUsername(java.lang.String username)

getWsdlLocation

public java.lang.String getWsdlLocation()

setWsdlLocation

public void setWsdlLocation(java.lang.String wsdlURL)
Specifies the URL where the proxy can find the WSDL defining the service the proxy implements.

Parameters:
wsdlURL - a string containing the WSDL's URL

getWsdlURL

public java.lang.String getWsdlURL()

setWsdlURL

public void setWsdlURL(java.lang.String wsdlURL)
Specifies the URL where the proxy can find the WSDL defining the service the proxy implements.

Parameters:
wsdlURL - a string containing the WSDL's URL

getEndpointName

public javax.xml.namespace.QName getEndpointName()

setEndpointName

public void setEndpointName(javax.xml.namespace.QName endpointName)

getServiceName

public javax.xml.namespace.QName getServiceName()
Returns the QName of the WSDL service the proxy implements

Returns:
the WSDL service's QName

setServiceName

public void setServiceName(javax.xml.namespace.QName serviceName)
Specifies the QName of the WSDL service the proxy implements. The service must exist or an error will result.

Parameters:
serviceName - the QName of the service for the proxy

getAddress

public java.lang.String getAddress()

setAddress

public void setAddress(java.lang.String add)

getConduitSelector

public ConduitSelector getConduitSelector()

setConduitSelector

public void setConduitSelector(ConduitSelector selector)

setBindingId

public void setBindingId(java.lang.String bind)

getBindingId

public java.lang.String getBindingId()

setTransportId

public void setTransportId(java.lang.String transportId)

getTransportId

public java.lang.String getTransportId()

getServiceFactory

public ReflectionServiceFactoryBean getServiceFactory()

setServiceFactory

public void setServiceFactory(ReflectionServiceFactoryBean sf)

getBus

public Bus getBus()

setBus

public void setBus(Bus bus)

getProperties

public java.util.Map<java.lang.String,java.lang.Object> getProperties()
Returns the property map for the proxy factory.

Returns:
the property map

setProperties

public void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
Specifies a set of properties used to configure the proxies provided by the factory. These properties include things like adding a namespace map to the JAXB databinding.

Parameters:
properties - the property map

getFeatures

public java.util.List<AbstractFeature> getFeatures()

setFeatures

public void setFeatures(java.util.List<AbstractFeature> f)

getDataBinding

public DataBinding getDataBinding()

setDataBinding

public void setDataBinding(DataBinding dataBinding)

setBindingConfig

public void setBindingConfig(BindingConfiguration config)

getBindingConfig

public BindingConfiguration getBindingConfig()


Apache CXF