javax.xml.rpc

Class ServiceFactory


public abstract class ServiceFactory
extends Object

Abstract implementation of a XML-RPC service.

Field Summary

static String
SERVICEFACTORY_PROPERTY

Constructor Summary

ServiceFactory()
Constructor.

Method Summary

abstract Service
createService(URL wsdlDocumentLocation, QName serviceName)
Creates an instance of the factory.
abstract Service
createService(QName serviceName)
Creates an instance of the factory.
abstract Service
loadService(Class<T> serviceInterface)
Creates an instance of the factory.
abstract Service
loadService(URL wsdlDocumentLocation, Class<T> serviceInterface, Properties properties)
Creates an instance of the factory.
abstract Service
loadService(URL wsdlDocumentLocation, QName serviceName, Properties properties)
Loads the service.
static ServiceFactory
newInstance()
Creates an instance of the factory.

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

SERVICEFACTORY_PROPERTY

public static final String SERVICEFACTORY_PROPERTY
Field Value:
"javax.xml.rpc.ServiceFactory"

Constructor Details

ServiceFactory

protected ServiceFactory()
Constructor.

Method Details

createService

public abstract Service createService(URL wsdlDocumentLocation,
                                      QName serviceName)
            throws ServiceException
Creates an instance of the factory.

createService

public abstract Service createService(QName serviceName)
            throws ServiceException
Creates an instance of the factory.
Usages and Demos :

View More Examples of createService(QName serviceName)
   1: import javax.xml.rpc.ServiceException;
   2: import javax.xml.rpc.ServiceFactory;
   3: 
   4:         ...
   5:     public void setServiceFactoryClass(Class serviceFactoryClass) {
   6:         if (serviceFactoryClass != null && !ServiceFactory.class.isAssignableFrom(serviceFactoryClass)) {
   7:         ...
   8:             throw new IllegalArgumentException("serviceFactoryClass must implement [javax.xml.rpc.ServiceFactory]");
   9:         }
  10:         ...
  11:         if (getWsdlDocumentUrl() != null) {
  12:             return serviceFactory.createService(getWsdlDocumentUrl(), serviceQName);

View Full Code Here

loadService

public abstract Service loadService(Class<T> serviceInterface)
            throws ServiceException
Creates an instance of the factory.
Usages and Demos :

View More Examples of loadService(Class serviceInterface)
   1: import javax.xml.rpc.ServiceException;
   2: import javax.xml.rpc.ServiceFactory;
   3: 
   4:         ...
   5:     public void setServiceFactoryClass(Class serviceFactoryClass) {
   6:         if (serviceFactoryClass != null && !ServiceFactory.class.isAssignableFrom(serviceFactoryClass)) {
   7:         ...
   8:             throw new IllegalArgumentException("serviceFactoryClass must implement [javax.xml.rpc.ServiceFactory]");
   9:         }
  10:         ...
  11:             }
  12:             return serviceFactory.loadService(getJaxRpcServiceInterface());

View Full Code Here

loadService

public abstract Service loadService(URL wsdlDocumentLocation,
                                    Class<T> serviceInterface,
                                    Properties properties)
            throws ServiceException
Creates an instance of the factory.

loadService

public abstract Service loadService(URL wsdlDocumentLocation,
                                    QName serviceName,
                                    Properties properties)
            throws ServiceException
Loads the service.

newInstance

public static ServiceFactory newInstance()
            throws ServiceException
Creates an instance of the factory.
Usages and Demos :

View More Examples of newInstance()
   1: import javax.xml.rpc.Service;
   2: import javax.xml.rpc.ServiceFactory;
   3: import java.net.URL;
   4:         ...
   5: 
   6:         ServiceFactory serviceFactory = ServiceFactory.newInstance();
   7:         ...
   8:         Service service = serviceFactory.createService(urlWsdl, new
   9:                 QName(nameSpaceUri, serviceName));

View Full Code Here
   1: import javax.xml.rpc.Service;
   2: import javax.xml.rpc.ServiceFactory;
   3: import java.net.URL;
   4:         ...
   5:         URL helloWsdlUrl = new URL(UrlString);
   6:         ServiceFactory serviceFactory = ServiceFactory.newInstance();
   7:         ...
   8:         Service helloService = serviceFactory.createService(helloWsdlUrl,
   9:                 new QName(nameSpaceUri, serviceName));

View Full Code Here
   1: import javax.xml.rpc.Service;
   2: import javax.xml.rpc.ServiceFactory;
   3: import java.net.URL;
   4:         ...
   5:         URL helloWsdlUrl = new URL(UrlString);
   6:         ServiceFactory serviceFactory = ServiceFactory.newInstance();
   7:         ...
   8:         Service helloService = serviceFactory.createService(helloWsdlUrl,
   9:                 new QName(nameSpaceUri, serviceName));

View Full Code Here
   1: import javax.xml.namespace.QName;
   2: import javax.xml.rpc.ServiceFactory;
   3: import javax.xml.rpc.ParameterMode;
   4:         ...
   5:             
   6:             ServiceFactory serviceFactory = ServiceFactory.newInstance();
   7:             
   8:         ...
   9:             Service weatherService = serviceFactory.createService(weatherWsdlUrl, 
  10:                 new QName(nameSpaceUri, serviceName));

View Full Code Here
   1:     public void testWeatherWSDL() throws Exception {
   2:         javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
   3:         java.net.URL url = new java.net.URL(new localhost.axis.services.Weather.WeatherGetterServiceLocator().getWeatherAddress() + "?WSDL");
   4:         ...
   5:         javax.xml.rpc.Service service = serviceFactory.createService(url, new localhost.axis.services.Weather.WeatherGetterServiceLocator().getServiceName());
   6:         assertTrue(service != null);
   7:     }

View Full Code Here