FileDocCategorySizeDatePackage
SOAPConnectionFactory.javaAPI DocJava SE 6 API3278Tue Jun 10 00:27:10 BST 2008javax.xml.soap

SOAPConnectionFactory

public abstract class SOAPConnectionFactory extends Object
A factory for creating SOAPConnection objects. Implementation of this class is optional. If SOAPConnectionFactory.newInstance() throws an UnsupportedOperationException then the implementation does not support the SAAJ communication infrastructure. Otherwise {@link SOAPConnection} objects can be created by calling createConnection() on the newly created SOAPConnectionFactory object.

Fields Summary
private static final String
DEFAULT_SOAP_CONNECTION_FACTORY
A constant representing the default value for a SOAPConnection object. The default is the point-to-point SOAP connection.
private static final String
SF_PROPERTY
A constant representing the SOAPConnection class.
Constructors Summary
Methods Summary
public abstract javax.xml.soap.SOAPConnectioncreateConnection()
Create a new SOAPConnection.

return
the new SOAPConnection object.
exception
SOAPException if there was an exception creating the SOAPConnection object.

public static javax.xml.soap.SOAPConnectionFactorynewInstance()
Creates an instance of the default SOAPConnectionFactory object.

return
a new instance of a default SOAPConnectionFactory object
exception
SOAPException if there was an error creating the SOAPConnectionFactory
exception
UnsupportedOperationException if newInstance is not supported.


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