Class 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.
    • Constructor Detail

      • DynamicClientFactory

        protected DynamicClientFactory​(Bus bus)
    • Method Detail

      • 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
      • 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:
        a new Client loaded using the wsdlUrl parameter
      • 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:
        a new Client loaded using the wsdlUrl parameter
      • 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​(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,
                                   QName service)
      • allowWrapperOps

        protected boolean allowWrapperOps()
      • 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 -