Class OMAbstractFactory

    • Method Detail

      • setMetaFactory

        public static void setMetaFactory​(OMMetaFactory newMetaFactory)
        Explicitly set a meta factory instance. The new instance will be returned by all subsequent calls to getMetaFactory(). Note that this is an application wide setting. More precisely, the configured meta factory will be used by all classes loaded from the class loader where Axiom is deployed and all its child class loaders. Therefore this method should be used with care and only be invoked during the initialization of the application.

        When Axiom is deployed as a bundle in an OSGi environment, this method will be used to inject the meta factory instance from the implementation bundle.

        Parameters:
        newMetaFactory - the new meta factory instance, or null to revert to the default meta factory instance determined by the org.apache.axiom.om.OMMetaFactory system property
      • getMetaFactory

        public static OMMetaFactory getMetaFactory()
        Get the default meta factory instance. The default instance is determined using the following algorithm:
        1. If an instance has been set using setMetaFactory(OMMetaFactory), then that instance is returned. Note that this will be the case in an OSGi runtime, where setMetaFactory(OMMetaFactory) is invoked by a helper component that is part of Axiom.
        2. If no instance has been set using setMetaFactory(OMMetaFactory), then the implementation class is determined by the org.apache.axiom.om.OMMetaFactory system property.
        3. If the org.apache.axiom.om.OMMetaFactory system property is not set, the meta factory for the LLOM implementation is returned.
        This method uses System.getProperty(String) to determine the value of the org.apache.axiom.om.OMMetaFactory system property. A SecurityException thrown by this method is simply ignored and the default factory implementation is used.
        Returns:
        the default OM factory instance
        Throws:
        OMException - if the factory's implementation class can't be found or if the class can't be instantiated
      • getOMFactory

        public static OMFactory getOMFactory()
        Get the default OM factory instance.
        Returns:
        the default OM factory instance
        Throws:
        OMException - if the factory's implementation class can't be found or if the class can't be instantiated
      • getSOAP11Factory

        public static SOAPFactory getSOAP11Factory()
        Get the default SOAP 1.1 OM factory instance.
        Returns:
        the default SOAP 1.1 OM factory instance
        Throws:
        OMException - if the factory's implementation class can't be found or if the class can't be instantiated
      • getSOAP12Factory

        public static SOAPFactory getSOAP12Factory()
        Get the default SOAP 1.2 OM factory instance.
        Returns:
        the default SOAP 1.2 OM factory instance
        Throws:
        OMException - if the factory's implementation class can't be found or if the class can't be instantiated