static <T> T find(Class<T> factoryClass, String defaultClassName, boolean tryFallback) throws SOAPException { return find(factoryClass, defaultClassName, tryFallback, null); }
static <T> T find(Class<T> factoryClass, String defaultClassName, boolean tryFallback) throws SOAPException { return find(factoryClass, defaultClassName, tryFallback, null); }
static <T> T find(Class<T> factoryClass, String defaultClassName, boolean tryFallback) throws SOAPException { return find(factoryClass, defaultClassName, tryFallback, null); }
static <T> T find(Class<T> factoryClass, String defaultClassName, boolean tryFallback) throws SOAPException { return find(factoryClass, defaultClassName, tryFallback, null); }
/** * Finds the implementation <code>Class</code> object for the given * factory name, or null if that fails. * <P> * This method is package private so that this code can be shared. * * @return the <code>Class</code> object of the specified message factory; * or <code>null</code> * * @param factoryId the name of the factory to find, which is * a system property * @exception SOAPException if there is a SOAP error */ static Object find(String factoryId) throws SOAPException { return find(factoryId, null, false); }
/** * Finds the implementation <code>Class</code> object for the given * factory name, or if that fails, finds the <code>Class</code> object * for the given fallback class name. The arguments supplied must be * used in order. If using the first argument is successful, the second * one will not be used. * <P> * This method is package private so that this code can be shared. * * @return the <code>Class</code> object of the specified message factory; * may not be <code>null</code> * * @param factoryId the name of the factory to find, which is * a system property * @param fallbackClassName the implementation class name, which is * to be used only if nothing else * is found; <code>null</code> to indicate that * there is no fallback class name * @exception SOAPException if there is a SOAP error */ static Object find(String factoryId, String fallbackClassName) throws SOAPException { return find(factoryId, fallbackClassName, true); }
static synchronized SAAJMetaFactory getInstance() throws SOAPException { if (instance == null) { try { instance = (SAAJMetaFactory)FactoryFinder.find(SAAJMetaFactory.class, "org.apache.axis2.saaj.SAAJMetaFactoryImpl"); } catch (Exception exception) { throw new SOAPException(exception.getMessage()); } } return instance; }
/** * Creates an instance of the default <CODE> SOAPConnectionFactory</CODE> object. * * @return a new instance of a default <CODE> SOAPConnectionFactory</CODE> object * @throws SOAPException if there was an error creating the <CODE>SOAPConnectionFactory * @throws UnsupportedOperationException if newInstance is not supported. */ public static SOAPConnectionFactory newInstance() throws SOAPException, UnsupportedOperationException { try { return (SOAPConnectionFactory)FactoryFinder.find(SOAPConnectionFactory.class, DEFAULT_SOAP_CONNECTION_FACTORY); } catch (Exception exception) { throw new SOAPException("Unable to create SOAP connection factory: " + exception.getMessage()); } }
/** * Creates a new instance of a concrete {@code SAAJMetaFactory} object. * The SAAJMetaFactory is an SPI, it pulls the creation of the other factories together into a * single place. Changing out the SAAJMetaFactory has the effect of changing out the entire SAAJ * implementation. Service providers provide the name of their {@code SAAJMetaFactory} * implementation. * * This method uses the lookup procedure specified in {@link javax.xml.soap} to locate and load the * {@link javax.xml.soap.SAAJMetaFactory} class. * * @return a concrete {@code SAAJMetaFactory} object * @exception SOAPException if there is an error in creating the {@code SAAJMetaFactory} */ static SAAJMetaFactory getInstance() throws SOAPException { try { return FactoryFinder.find( SAAJMetaFactory.class, DEFAULT_META_FACTORY_CLASS, true, META_FACTORY_DEPRECATED_CLASS_PROPERTY); } catch (Exception e) { throw new SOAPException( "Unable to create SAAJ meta-factory: " + e.getMessage()); } }
/** * Creates an instance of the default * <code>SOAPConnectionFactory</code> object. * * @return a new instance of a default * <code>SOAPConnectionFactory</code> object * * @exception SOAPException if there was an error creating the * <code>SOAPConnectionFactory</code> * * @exception UnsupportedOperationException if newInstance is not * supported. */ public static SOAPConnectionFactory newInstance() throws SOAPException, UnsupportedOperationException { try { return (SOAPConnectionFactory) FactoryFinder.find(SF_PROPERTY, DEFAULT_SOAP_CONNECTION_FACTORY); } catch (Exception ex) { throw new SOAPException("Unable to create SOAP connection factory: " +ex.getMessage()); } }
/** * Creates an instance of the default * {@code SOAPConnectionFactory} object. * * This method uses the lookup procedure specified in {@link javax.xml.soap} to locate and load the * {@link javax.xml.soap.SOAPConnectionFactory} class. * * @return a new instance of a default * {@code SOAPConnectionFactory} object * * @exception SOAPException if there was an error creating the * {@code SOAPConnectionFactory} * * @exception UnsupportedOperationException if newInstance is not * supported. */ public static SOAPConnectionFactory newInstance() throws SOAPException, UnsupportedOperationException { try { return FactoryFinder.find( SOAPConnectionFactory.class, DEFAULT_SOAP_CONNECTION_FACTORY, true); } catch (Exception ex) { throw new SOAPException("Unable to create SOAP connection factory: " +ex.getMessage()); } }
/** * Creates an instance of the default * {@code SOAPConnectionFactory} object. * * This method uses the lookup procedure specified in {@link javax.xml.soap} to locate and load the * {@link javax.xml.soap.SOAPConnectionFactory} class. * * @return a new instance of a default * {@code SOAPConnectionFactory} object * * @exception SOAPException if there was an error creating the * {@code SOAPConnectionFactory} * * @exception UnsupportedOperationException if newInstance is not * supported. */ public static SOAPConnectionFactory newInstance() throws SOAPException, UnsupportedOperationException { try { return FactoryFinder.find( SOAPConnectionFactory.class, DEFAULT_SOAP_CONNECTION_FACTORY, true); } catch (Exception ex) { throw new SOAPException("Unable to create SOAP connection factory: " +ex.getMessage()); } }
/** * Creates a new instance of <code>SOAPFactory</code>. * * @return a new instance of a <code>SOAPFactory</code> * @throws SOAPException if there was an error creating the default <code>SOAPFactory</code> */ public static SOAPFactory newInstance() throws SOAPException { try { SOAPFactory factory = (SOAPFactory)FactoryFinder.find(SOAPFactory.class, null); if (factory == null) { factory = newInstance(SOAPConstants.SOAP_1_1_PROTOCOL); } return factory; } catch (Exception exception) { throw new SOAPException("Unable to create SOAPFactory: " + exception.getMessage()); } }
/** * Creates a new <CODE>MessageFactory</CODE> object that is an instance of the default * implementation. * * @return a new <CODE>MessageFactory</CODE> object * @throws SOAPException if there was an error in creating the default implementation of the * <CODE> MessageFactory</CODE> */ public static MessageFactory newInstance() throws SOAPException { try { MessageFactory factory = (MessageFactory)FactoryFinder.find(MessageFactory.class, null); if (factory == null) { factory = newInstance(SOAPConstants.SOAP_1_1_PROTOCOL); } return factory; } catch (Exception exception) { throw new SOAPException("Unable to create MessageFactory: " + exception.getMessage()); } }
/** * Creates a new {@code MessageFactory} object that is an instance * of the default implementation (SOAP 1.1). * * This method uses the lookup procedure specified in {@link javax.xml.soap} to locate and load the * {@link javax.xml.soap.MessageFactory} class. * * @return a new instance of a {@code MessageFactory} * * @exception SOAPException if there was an error in creating the * default implementation of the * {@code MessageFactory}. * @see SAAJMetaFactory */ public static MessageFactory newInstance() throws SOAPException { try { MessageFactory factory = (MessageFactory) FactoryFinder.find( MessageFactory.class, DEFAULT_MESSAGE_FACTORY, false); if (factory != null) { return factory; } return newInstance(SOAPConstants.SOAP_1_1_PROTOCOL); } catch (Exception ex) { throw new SOAPException( "Unable to create message factory for SOAP: " +ex.getMessage()); } }
/** * Creates a new {@code SOAPFactory} object that is an instance of * the default implementation (SOAP 1.1). * * This method uses the lookup procedure specified in {@link javax.xml.soap} to locate and load the * {@link javax.xml.soap.SOAPFactory} class. * * @return a new instance of a {@code SOAPFactory} * * @exception SOAPException if there was an error creating the * default {@code SOAPFactory} * @see SAAJMetaFactory */ public static SOAPFactory newInstance() throws SOAPException { try { SOAPFactory factory = FactoryFinder.find( SOAPFactory.class, DEFAULT_SOAP_FACTORY, false); if (factory != null) return factory; // leave it on SAAJMetaFactory return newInstance(SOAPConstants.SOAP_1_1_PROTOCOL); } catch (Exception ex) { throw new SOAPException( "Unable to create SOAP Factory: " + ex.getMessage()); } }
/** * Creates a new {@code SOAPFactory} object that is an instance of * the default implementation (SOAP 1.1). * * This method uses the lookup procedure specified in {@link javax.xml.soap} to locate and load the * {@link javax.xml.soap.SOAPFactory} class. * * @return a new instance of a {@code SOAPFactory} * * @exception SOAPException if there was an error creating the * default {@code SOAPFactory} * @see SAAJMetaFactory */ public static SOAPFactory newInstance() throws SOAPException { try { SOAPFactory factory = FactoryFinder.find( SOAPFactory.class, DEFAULT_SOAP_FACTORY, false); if (factory != null) return factory; // leave it on SAAJMetaFactory return newInstance(SOAPConstants.SOAP_1_1_PROTOCOL); } catch (Exception ex) { throw new SOAPException( "Unable to create SOAP Factory: " + ex.getMessage()); } }
/** * Creates a new {@code SOAPFactory} object that is an instance of * the default implementation (SOAP 1.1). * * This method uses the lookup procedure specified in {@link javax.xml.soap} to locate and load the * {@link javax.xml.soap.SOAPFactory} class. * * @return a new instance of a {@code SOAPFactory} * * @exception SOAPException if there was an error creating the * default {@code SOAPFactory} * @see SAAJMetaFactory */ public static SOAPFactory newInstance() throws SOAPException { try { SOAPFactory factory = FactoryFinder.find( SOAPFactory.class, DEFAULT_SOAP_FACTORY, false); if (factory != null) return factory; // leave it on SAAJMetaFactory return newInstance(SOAPConstants.SOAP_1_1_PROTOCOL); } catch (Exception ex) { throw new SOAPException( "Unable to create SOAP Factory: " + ex.getMessage()); } }
/** * Creates a new {@code SOAPFactory} object that is an instance of * the default implementation (SOAP 1.1). * * This method uses the lookup procedure specified in {@link javax.xml.soap} to locate and load the * {@link javax.xml.soap.SOAPFactory} class. * * @return a new instance of a {@code SOAPFactory} * * @exception SOAPException if there was an error creating the * default {@code SOAPFactory} * @see SAAJMetaFactory */ public static SOAPFactory newInstance() throws SOAPException { try { SOAPFactory factory = FactoryFinder.find( SOAPFactory.class, DEFAULT_SOAP_FACTORY, false); if (factory != null) return factory; // leave it on SAAJMetaFactory return newInstance(SOAPConstants.SOAP_1_1_PROTOCOL); } catch (Exception ex) { throw new SOAPException( "Unable to create SOAP Factory: " + ex.getMessage()); } }
/** * Creates a new {@code MessageFactory} object that is an instance * of the default implementation (SOAP 1.1). * * This method uses the lookup procedure specified in {@link javax.xml.soap} to locate and load the * {@link javax.xml.soap.MessageFactory} class. * * @return a new instance of a {@code MessageFactory} * * @exception SOAPException if there was an error in creating the * default implementation of the * {@code MessageFactory}. * @see SAAJMetaFactory */ public static MessageFactory newInstance() throws SOAPException { try { MessageFactory factory = (MessageFactory) FactoryFinder.find( MessageFactory.class, DEFAULT_MESSAGE_FACTORY, false); if (factory != null) { return factory; } return newInstance(SOAPConstants.SOAP_1_1_PROTOCOL); } catch (Exception ex) { throw new SOAPException( "Unable to create message factory for SOAP: " +ex.getMessage()); } }