Name

SOAPConnectionFactory

Synopsis

public abstract class SOAPConnectionFactory {
// Public Constructors
    public SOAPConnectionFactory(  ); 
// Public Class Methods
    public static SOAPConnectionFactory newInstance()
        throws SOAPExceptionUnsupportedOperationException; 
// Public Instance Methods
    public abstract SOAPConnection createConnection(  ) throws SOAPException;
}

SOAPConnectionFactory is a factory object used to create SOAPConnections. To obtain an instance of this class, which is abstract, use the static newInstance( ) method, which uses the following algorithm to locate a suitable concrete implementation:

  • Looks in the system properties for a property called javax.xml.soap.SOAPConnectionFactory. If this property is defined, its value is assumed to be the class name of a concrete implementation of SOAPConnectionFactory.

  • 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.SOAPConnectionFactory in 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 required 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.client.p2p.HttpSOAPConnectionFactory.

Once you have a SOAPConnectionFactory, you can use its createConnection( ) method to obtain ...

Get Java Web Services in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.