Apache CXF API

org.apache.cxf.endpoint.dynamic
Class DynamicClientFactory

java.lang.Object
  extended by org.apache.cxf.endpoint.dynamic.DynamicClientFactory
Direct Known Subclasses:
JaxWsDynamicClientFactory

public class DynamicClientFactory
extends Object

This class reads a WSDL and creates a dynamic client from it. Use newInstance(org.apache.cxf.Bus) to obtain an instance, and then createClient(String) (or other overloads) to create a client. It uses the JAXB data binding. It does not set up complex interceptors for features such as attachments. See JaxWsDynamicClientFactory for an alternative that sets up JAX-WS endpoints. This class may be subclassed to allow for other endpoints or behaviors.


Nested Class Summary
 class DynamicClientFactory.LocationFilterReader
           
 
Constructor Summary
protected DynamicClientFactory(Bus bus)
           
 
Method Summary
protected  boolean allowWrapperOps()
           
 Node cloneNode(Document document, Node node, boolean deep)
           
protected  boolean compileJavaSrc(String classPath, List<File> srcList, String dest)
           
 Client createClient(String wsdlUrl)
          Create a new Client instance using the WSDL to be loaded from the specified URL and using the current classloading context.
 Client createClient(String wsdlUrl, ClassLoader classLoader)
          Create a new Client instance using the WSDL to be loaded from the specified URL and with the specified ClassLoader as parent.
 Client createClient(String wsdlUrl, ClassLoader classLoader, List<String> bindingFiles)
           
 Client createClient(String wsdlUrl, List<String> bindingFiles)
           
 Client createClient(String wsdlUrl, QName service)
           
 Client createClient(String wsdlUrl, QName service, ClassLoader classLoader, QName port)
           
 Client createClient(String wsdlUrl, QName service, ClassLoader classLoader, QName port, List<String> bindingFiles)
           
 Client createClient(String wsdlUrl, QName service, List<String> bindingFiles)
           
 Client createClient(String wsdlUrl, QName service, QName port)
           
 Client createClient(String wsdlUrl, QName service, QName port, List<String> bindingFiles)
           
 Client createClient(URL wsdlUrl)
          Create a new Client instance using the WSDL to be loaded from the specified URL and using the current classloading context.
 Client createClient(URL wsdlUrl, ClassLoader classLoader)
          Create a new Client instance using the WSDL to be loaded from the specified URL and with the specified ClassLoader as parent.
 Client createClient(URL wsdlUrl, ClassLoader classLoader, List<String> bindingFiles)
           
 Client createClient(URL wsdlUrl, List<String> bindingFiles)
           
 Client createClient(URL wsdlUrl, QName service)
           
 Client createClient(URL wsdlUrl, QName service, ClassLoader classLoader, QName port)
           
 Client createClient(URL wsdlUrl, QName service, ClassLoader classLoader, QName port, List<String> bindingFiles)
           
 Client createClient(URL wsdlUrl, QName service, List<String> bindingFiles)
           
 Client createClient(URL wsdlUrl, QName service, QName port)
           
 Client createClient(URL wsdlUrl, QName service, QName port, List<String> bindingFiles)
           
protected  JAXBUtils.SchemaCompiler createSchemaCompiler()
           
protected  EndpointImplFactory getEndpointImplFactory()
           
 Map<String,Object> getJaxbContextProperties()
          Return the map of JAXB context properties used at the time that we create new contexts.
 boolean isSimpleBindingEnabled()
           
static DynamicClientFactory newInstance()
          Create a new instance using a default Bus.
static DynamicClientFactory newInstance(Bus b)
          Create a new instance using a specific Bus.
 void setAllowElementReferences(boolean b)
           
 void setJaxbContextProperties(Map<String,Object> jaxbContextProperties)
          Set the map of JAXB context properties used at the time that we create new contexts.
 void setSchemaCompilerOptions(String[] options)
           
 void setSimpleBindingEnabled(boolean simpleBindingEnabled)
           
 void setTemporaryDirectory(String dir)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicClientFactory

protected DynamicClientFactory(Bus bus)
Method Detail

getEndpointImplFactory

protected EndpointImplFactory getEndpointImplFactory()

setTemporaryDirectory

public void setTemporaryDirectory(String dir)

setAllowElementReferences

public void setAllowElementReferences(boolean b)

setSchemaCompilerOptions

public void setSchemaCompilerOptions(String[] options)

newInstance

public static DynamicClientFactory newInstance(Bus b)
Create a new instance using a specific Bus.

Parameters:
b - the Bus to use in subsequent operations with the instance
Returns:
the new instance

newInstance

public static DynamicClientFactory newInstance()
Create a new instance using a default Bus.

Returns:
the new instance
See Also:
BusFactory.getDefaultBus()

createClient

public Client createClient(String wsdlUrl)
Create a new Client instance using the WSDL to be loaded from the specified URL and using the current classloading context.

Parameters:
wsdlURL - the URL to load
Returns:

createClient

public Client createClient(String wsdlUrl,
                           List<String> bindingFiles)

createClient

public Client createClient(URL wsdlUrl)
Create a new Client instance using the WSDL to be loaded from the specified URL and using the current classloading context.

Parameters:
wsdlURL - the URL to load
Returns:

createClient

public Client createClient(URL wsdlUrl,
                           List<String> bindingFiles)

createClient

public Client createClient(String wsdlUrl,
                           ClassLoader classLoader)
Create a new Client instance using the WSDL to be loaded from the specified URL and with the specified ClassLoader as parent.

Parameters:
wsdlUrl -
classLoader -
Returns:

createClient

public Client createClient(String wsdlUrl,
                           ClassLoader classLoader,
                           List<String> bindingFiles)

createClient

public Client createClient(String wsdlUrl,
                           QName service)

createClient

public Client createClient(String wsdlUrl,
                           QName service,
                           List<String> bindingFiles)

createClient

public Client createClient(String wsdlUrl,
                           QName service,
                           QName port)

createClient

public Client createClient(String wsdlUrl,
                           QName service,
                           QName port,
                           List<String> bindingFiles)

createClient

public Client createClient(String wsdlUrl,
                           QName service,
                           ClassLoader classLoader,
                           QName port)

createClient

public Client createClient(URL wsdlUrl,
                           ClassLoader classLoader)
Create a new Client instance using the WSDL to be loaded from the specified URL and with the specified ClassLoader as parent.

Parameters:
wsdlUrl -
classLoader -
Returns:

createClient

public Client createClient(URL wsdlUrl,
                           ClassLoader classLoader,
                           List<String> bindingFiles)

createClient

public Client createClient(URL wsdlUrl,
                           QName service)

createClient

public Client createClient(URL wsdlUrl,
                           QName service,
                           List<String> bindingFiles)

createClient

public Client createClient(URL wsdlUrl,
                           QName service,
                           QName port)

createClient

public Client createClient(URL wsdlUrl,
                           QName service,
                           QName port,
                           List<String> bindingFiles)

createClient

public Client createClient(URL wsdlUrl,
                           QName service,
                           ClassLoader classLoader,
                           QName port)

createClient

public Client createClient(URL wsdlUrl,
                           QName service,
                           ClassLoader classLoader,
                           QName port,
                           List<String> bindingFiles)

createClient

public Client createClient(String wsdlUrl,
                           QName service,
                           ClassLoader classLoader,
                           QName port,
                           List<String> bindingFiles)

allowWrapperOps

protected boolean allowWrapperOps()

createSchemaCompiler

protected JAXBUtils.SchemaCompiler createSchemaCompiler()

isSimpleBindingEnabled

public boolean isSimpleBindingEnabled()

setSimpleBindingEnabled

public void setSimpleBindingEnabled(boolean simpleBindingEnabled)

compileJavaSrc

protected boolean compileJavaSrc(String classPath,
                                 List<File> srcList,
                                 String dest)

getJaxbContextProperties

public Map<String,Object> getJaxbContextProperties()
Return the map of JAXB context properties used at the time that we create new contexts.

Returns:
the map

setJaxbContextProperties

public void setJaxbContextProperties(Map<String,Object> jaxbContextProperties)
Set the map of JAXB context properties used at the time that we create new contexts.

Parameters:
jaxbContextProperties -

cloneNode

public Node cloneNode(Document document,
                      Node node,
                      boolean deep)
               throws DOMException
Throws:
DOMException

Apache CXF API

Apache CXF