public static MessageFactory newInstance()
        throws SOAPException {
        try {
            MessageFactory factory = (MessageFactory)
                FactoryFinder.find(MESSAGE_FACTORY_PROPERTY);

            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());
        }

    }
public static MessageFactory newInstance ( ) throws SOAPException { try { MessageFactory factory = ( MessageFactory ) FactoryFinder . find ( MESSAGE_FACTORY_PROPERTY ) ; 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>MessageFactory</code> object that is an instance
of the default implementation (SOAP 1.1),

This method uses the following ordered lookup procedure to determine the MessageFactory implementation class to load:
<UL>
<LI> Use the javax.xml.soap.MessageFactory system property.
<LI> Use the properties file "lib/jaxm.properties" in the JRE directory. This configuration file is in standard
java.util.Properties format and contains the fully qualified name of the implementation class with the key being the
system property defined above.
<LI> Use the Services API (as detailed in the JAR specification), if available, to determine the classname. The Services API
will look for a classname in the file META-INF/services/javax.xml.soap.MessageFactory in jars available to the runtime.
<LI> Use the SAAJMetaFactory instance to locate the MessageFactory implementation class.
</UL>


@return a new instance of a <code>MessageFactory</code>

@exception SOAPException if there was an error in creating the
default implementation of the
<code>MessageFactory</code>.
@see SAAJMetaFactory