Package org.apache.cxf.endpoint.dynamic
Class DynamicClientFactory
- java.lang.Object
-
- 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. UsenewInstance(org.apache.cxf.Bus)to obtain an instance, and thencreateClient(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. SeeJaxWsDynamicClientFactoryfor an alternative that sets up JAX-WS endpoints. This class may be subclassed to allow for other endpoints or behaviors.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDynamicClientFactory.LocationFilterReader
-
Constructor Summary
Constructors Modifier Constructor Description protectedDynamicClientFactory(Bus bus)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanallowWrapperOps()protected voidapplySchemaCompilerOptions(JAXBUtils.SchemaCompiler compiler)NodecloneNode(Document document, Node node, boolean deep)protected booleancompileJavaSrc(String classPath, List<File> srcList, String dest)ClientcreateClient(String wsdlUrl)Create a newClientinstance using the WSDL to be loaded from the specified URL and using the current classloading context.ClientcreateClient(String wsdlUrl, ClassLoader classLoader)Create a newClientinstance using the WSDL to be loaded from the specified URL and with the specifiedClassLoaderas parent.ClientcreateClient(String wsdlUrl, ClassLoader classLoader, List<String> bindingFiles)ClientcreateClient(String wsdlUrl, List<String> bindingFiles)ClientcreateClient(String wsdlUrl, QName service)ClientcreateClient(String wsdlUrl, QName service, ClassLoader classLoader, QName port)ClientcreateClient(String wsdlUrl, QName service, ClassLoader classLoader, QName port, List<String> bindingFiles)ClientcreateClient(String wsdlUrl, QName service, List<String> bindingFiles)ClientcreateClient(String wsdlUrl, QName service, QName port)ClientcreateClient(String wsdlUrl, QName service, QName port, List<String> bindingFiles)ClientcreateClient(URL wsdlUrl)Create a newClientinstance using the WSDL to be loaded from the specified URL and using the current classloading context.ClientcreateClient(URL wsdlUrl, ClassLoader classLoader)Create a newClientinstance using the WSDL to be loaded from the specified URL and with the specifiedClassLoaderas parent.ClientcreateClient(URL wsdlUrl, ClassLoader classLoader, List<String> bindingFiles)ClientcreateClient(URL wsdlUrl, List<String> bindingFiles)ClientcreateClient(URL wsdlUrl, QName service)ClientcreateClient(URL wsdlUrl, QName service, ClassLoader classLoader, QName port)ClientcreateClient(URL wsdlUrl, QName service, ClassLoader classLoader, QName port, List<String> bindingFiles)ClientcreateClient(URL wsdlUrl, QName service, List<String> bindingFiles)ClientcreateClient(URL wsdlUrl, QName service, QName port)ClientcreateClient(URL wsdlUrl, QName service, QName port, List<String> bindingFiles)protected JAXBUtils.SchemaCompilercreateSchemaCompiler()protected EndpointImplFactorygetEndpointImplFactory()Map<String,Object>getJaxbContextProperties()Return the map of JAXB context properties used at the time that we create new contexts.booleanisSimpleBindingEnabled()static DynamicClientFactorynewInstance()Create a new instance using a default Bus.static DynamicClientFactorynewInstance(Bus b)Create a new instance using a specific Bus.voidsetAllowElementReferences(boolean b)voidsetJaxbContextProperties(Map<String,Object> jaxbContextProperties)Set the map of JAXB context properties used at the time that we create new contexts.voidsetSchemaCompilerOptions(String[] options)voidsetSimpleBindingEnabled(boolean simpleBindingEnabled)voidsetTemporaryDirectory(String dir)
-
-
-
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 newClientinstance using the WSDL to be loaded from the specified URL and using the current classloading context.- Parameters:
wsdlUrl- the URL to load- Returns:
- a new Client loaded using the wsdlUrl parameter
-
createClient
public Client createClient(URL wsdlUrl)
Create a newClientinstance using the WSDL to be loaded from the specified URL and using the current classloading context.- Parameters:
wsdlUrl- the URL to load- Returns:
- a new Client loaded using the wsdlUrl parameter
-
createClient
public Client createClient(String wsdlUrl, ClassLoader classLoader)
Create a newClientinstance using the WSDL to be loaded from the specified URL and with the specifiedClassLoaderas parent.- Parameters:
wsdlUrl-classLoader-- Returns:
-
createClient
public Client createClient(String wsdlUrl, ClassLoader classLoader, List<String> bindingFiles)
-
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 newClientinstance using the WSDL to be loaded from the specified URL and with the specifiedClassLoaderas parent.- Parameters:
wsdlUrl-classLoader-- Returns:
-
createClient
public Client createClient(URL wsdlUrl, ClassLoader classLoader, List<String> bindingFiles)
-
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()
-
applySchemaCompilerOptions
protected void applySchemaCompilerOptions(JAXBUtils.SchemaCompiler compiler)
-
isSimpleBindingEnabled
public boolean isSimpleBindingEnabled()
-
setSimpleBindingEnabled
public void setSimpleBindingEnabled(boolean simpleBindingEnabled)
-
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
-
-