FileDocCategorySizeDatePackage
ServiceFactory.javaAPI DocApache Axis 1.43962Sat Apr 22 18:57:28 BST 2006javax.xml.rpc

ServiceFactory

public abstract class ServiceFactory extends Object
The javax.xml.rpc.ServiceFactory is an abstract class that provides a factory for the creation of instances of the type javax.xml.rpc.Service. This abstract class follows the abstract static factory design pattern. This enables a J2SE based client to create a Service instance in a portable manner without using the constructor of the Service implementation class.

The ServiceFactory implementation class is set using the system property SERVICEFACTORY_PROPERTY.

version
1.0

Fields Summary
public static final String
SERVICEFACTORY_PROPERTY
A constant representing the property used to lookup the name of a ServiceFactory implementation class.
Constructors Summary
protected ServiceFactory()
Protected constructor.

Methods Summary
public abstract ServicecreateService(java.net.URL wsdlDocumentLocation, javax.xml.namespace.QName serviceName)
Create a Service instance.

param
wsdlDocumentLocation URL for the WSDL document location
param
serviceName QName for the service.
return
Service.
throws
ServiceException If any error in creation of the specified service

public abstract ServicecreateService(javax.xml.namespace.QName serviceName)
Create a Service instance.

param
serviceName QName for the service
return
Service.
throws
ServiceException If any error in creation of the specified service

public abstract ServiceloadService(java.lang.Class class1)

public abstract ServiceloadService(java.net.URL url, java.lang.Class class1, java.util.Properties properties)

public abstract ServiceloadService(java.net.URL url, javax.xml.namespace.QName qname, java.util.Properties properties)

public static javax.xml.rpc.ServiceFactorynewInstance()
Gets an instance of the ServiceFactory

Only one copy of a factory exists and is returned to the application each time this method is called.

The implementation class to be used can be overridden by setting the javax.xml.rpc.ServiceFactory system property.

return
ServiceFactory.
throws
ServiceException


                                                        
          

        try {
            return (ServiceFactory) FactoryFinder.find(
                /* The default property name according to the JAXRPC spec */
                SERVICEFACTORY_PROPERTY,
                /* The fallback implementation class name */
                "org.apache.axis.client.ServiceFactory");
        } catch (FactoryFinder.ConfigurationError e) {
            throw new ServiceException(e.getException());
        }