Name
MessageFactory
Synopsis
public abstract class MessageFactory {
// Public Constructors
public MessageFactory( );
// Public Class Methods
public static MessageFactory newInstance( ) throws SOAPException;
// Public Instance Methods
public abstract SOAPMessage createMessage( ) throws SOAPException;
public abstract SOAPMessage createMessage(MimeHeaders headers,
java.io.InputStream in) throws java.io.IOExceptionSOAPException;
}MessageFactory is an abstract base class that
provides the methods used by application code to construct SOAP
messages. A SAAJ application obtains an instance of this class by
calling the static newInstance( ) method, which
looks for a suitable concrete implementation using the following
algorithm:
Looks in the system properties for a property called
javax.xml.soap.MessageFactory. If this property is defined, its value is assumed to be the class name of a concrete implementation ofMessageFactory.Looks for the same property in a file called
${JAVA_HOME}/lib/jaxm.properties. If the property is found, its value is assumed to be the required class name.Looks for a resource called
META-INF/services/javax.xml.soap.MessageFactoryin the classpath. If such a resource exists, it is opened and a single line is read from it. If the line is not empty, it is used as the class name.Finally, an implementation-dependent default class is used. In the case of the reference implementation, this class is called
com.sun.xml.messaging.saaj.soap.MessageFactoryImpl.
Once you have a ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access