Package javax.xml.rpc
Class ServiceFactory
java.lang.Object
javax.xml.rpc.ServiceFactory
- Direct Known Subclasses:
ServiceFactory
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
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
A constant representing the property used to lookup the name of aServiceFactory
implementation class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Service
createService
(URL wsdlDocumentLocation, QName serviceName) Create aService
instance.abstract Service
createService
(QName serviceName) Create aService
instance.abstract Service
loadService
(Class class1) abstract Service
loadService
(URL url, Class class1, Properties properties) abstract Service
loadService
(URL url, QName qname, Properties properties) static ServiceFactory
Gets an instance of theServiceFactory
-
Field Details
-
SERVICEFACTORY_PROPERTY
A constant representing the property used to lookup the name of aServiceFactory
implementation class.- See Also:
-
-
Constructor Details
-
ServiceFactory
protected ServiceFactory()Protected constructor.
-
-
Method Details
-
newInstance
Gets an instance of theServiceFactory
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.
- Returns:
- ServiceFactory.
- Throws:
ServiceException
-
createService
public abstract Service createService(URL wsdlDocumentLocation, QName serviceName) throws ServiceException Create aService
instance.- Parameters:
wsdlDocumentLocation
- URL for the WSDL document locationserviceName
- QName for the service.- Returns:
- Service.
- Throws:
ServiceException
- If any error in creation of the specified service
-
createService
Create aService
instance.- Parameters:
serviceName
- QName for the service- Returns:
- Service.
- Throws:
ServiceException
- If any error in creation of the specified service
-
loadService
- Throws:
ServiceException
-
loadService
public abstract Service loadService(URL url, Class class1, Properties properties) throws ServiceException - Throws:
ServiceException
-
loadService
public abstract Service loadService(URL url, QName qname, Properties properties) throws ServiceException - Throws:
ServiceException
-