Class DynamicClientFactory

java.lang.Object
org.apache.cxf.endpoint.dynamic.DynamicClientFactory

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 org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory for an alternative that sets up JAX-WS endpoints. This class may be subclassed to allow for other endpoints or behaviors.
  • Constructor Details

    • DynamicClientFactory

      protected DynamicClientFactory(org.apache.cxf.Bus bus)
  • Method Details

    • getEndpointImplFactory

      protected org.apache.cxf.endpoint.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(org.apache.cxf.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 org.apache.cxf.endpoint.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:
      a new Client loaded using the wsdlUrl parameter
    • createClient

      public org.apache.cxf.endpoint.Client createClient(String wsdlUrl, List<String> bindingFiles)
    • createClient

      public org.apache.cxf.endpoint.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:
      a new Client loaded using the wsdlUrl parameter
    • createClient

      public org.apache.cxf.endpoint.Client createClient(URL wsdlUrl, List<String> bindingFiles)
    • createClient

      public org.apache.cxf.endpoint.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 org.apache.cxf.endpoint.Client createClient(String wsdlUrl, ClassLoader classLoader, List<String> bindingFiles)
    • createClient

      public org.apache.cxf.endpoint.Client createClient(String wsdlUrl, QName service)
    • createClient

      public org.apache.cxf.endpoint.Client createClient(String wsdlUrl, QName service, List<String> bindingFiles)
    • createClient

      public org.apache.cxf.endpoint.Client createClient(String wsdlUrl, QName service, QName port)
    • createClient

      public org.apache.cxf.endpoint.Client createClient(String wsdlUrl, QName service, QName port, List<String> bindingFiles)
    • createClient

      public org.apache.cxf.endpoint.Client createClient(String wsdlUrl, QName service, ClassLoader classLoader, QName port)
    • createClient

      public org.apache.cxf.endpoint.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 org.apache.cxf.endpoint.Client createClient(URL wsdlUrl, ClassLoader classLoader, List<String> bindingFiles)
    • createClient

      public org.apache.cxf.endpoint.Client createClient(URL wsdlUrl, QName service)
    • createClient

      public org.apache.cxf.endpoint.Client createClient(URL wsdlUrl, QName service, List<String> bindingFiles)
    • createClient

      public org.apache.cxf.endpoint.Client createClient(URL wsdlUrl, QName service, QName port)
    • createClient

      public org.apache.cxf.endpoint.Client createClient(URL wsdlUrl, QName service, QName port, List<String> bindingFiles)
    • createClient

      public org.apache.cxf.endpoint.Client createClient(URL wsdlUrl, QName service, ClassLoader classLoader, QName port)
    • createClient

      public org.apache.cxf.endpoint.Client createClient(URL wsdlUrl, QName service, ClassLoader classLoader, QName port, List<String> bindingFiles)
    • createClient

      public org.apache.cxf.endpoint.Client createClient(String wsdlUrl, QName service, ClassLoader classLoader, QName port, List<String> bindingFiles)
    • allowWrapperOps

      protected boolean allowWrapperOps()
    • createSchemaCompiler

      protected org.apache.cxf.common.jaxb.JAXBUtils.SchemaCompiler createSchemaCompiler()
    • applySchemaCompilerOptions

      protected void applySchemaCompilerOptions(org.apache.cxf.common.jaxb.JAXBUtils.SchemaCompiler compiler)
    • 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