org.jboss.axis.client
Class ServiceFactory

java.lang.Object
  extended byjavax.xml.rpc.ServiceFactory (src) 
      extended byorg.jboss.axis.client.ServiceFactory
All Implemented Interfaces:
javax.naming.spi.ObjectFactory

public class ServiceFactory
extends ServiceFactory (src)
implements javax.naming.spi.ObjectFactory

Helper class for obtaining Services from JNDI.

!!! WORK IN PROGRESS


Field Summary
static java.lang.String MAINTAIN_SESSION
           
static java.lang.String SERVICE_CLASSNAME
           
static java.lang.String SERVICE_LOCAL_PART
           
static java.lang.String SERVICE_NAMESPACE
           
static java.lang.String WSDL_LOCATION
           
 
Fields inherited from class javax.xml.rpc.ServiceFactory (src)
SERVICEFACTORY_PROPERTY
 
Constructor Summary
ServiceFactory()
           
 
Method Summary
 Service (src) createService(QName (src)  serviceName)
          Create a Service instance.
 Service (src) createService(java.net.URL wsdlDocumentLocation, QName (src)  serviceName)
          Create a Service instance.
 java.lang.Object getObjectInstance(java.lang.Object refObject, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable environment)
           
static Service (src) getService(java.util.Map environment)
          Obtain an AxisClient reference, using JNDI if possible, otherwise creating one using the standard Axis configuration pattern.
 Service (src) loadService(java.lang.Class aClass)
          Create an instance of the generated service implementation class for a given service interface, if available.
 Service (src) loadService(java.net.URL url, java.lang.Class aClass, java.util.Properties properties)
          Create an instance of the generated service implementation class for a given service interface, if available.
 Service (src) loadService(java.net.URL url, QName (src)  qName, java.util.Properties properties)
          Create an instance of the generated service implementation class for a given service, if available.
 
Methods inherited from class javax.xml.rpc.ServiceFactory (src)
newInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_CLASSNAME

public static final java.lang.String SERVICE_CLASSNAME
See Also:
Constant Field Values (src)

WSDL_LOCATION

public static final java.lang.String WSDL_LOCATION
See Also:
Constant Field Values (src)

MAINTAIN_SESSION

public static final java.lang.String MAINTAIN_SESSION
See Also:
Constant Field Values (src)

SERVICE_NAMESPACE

public static final java.lang.String SERVICE_NAMESPACE
See Also:
Constant Field Values (src)

SERVICE_LOCAL_PART

public static final java.lang.String SERVICE_LOCAL_PART
See Also:
Constant Field Values (src)
Constructor Detail

ServiceFactory

public ServiceFactory()
Method Detail

getService

public static Service (src)  getService(java.util.Map environment)
Obtain an AxisClient reference, using JNDI if possible, otherwise creating one using the standard Axis configuration pattern. If we end up creating one and do have JNDI access, bind it to the passed name so we find it next time.

Parameters:
environment -
Returns:
a service

getObjectInstance

public java.lang.Object getObjectInstance(java.lang.Object refObject,
                                          javax.naming.Name name,
                                          javax.naming.Context nameCtx,
                                          java.util.Hashtable environment)
                                   throws java.lang.Exception
Specified by:
getObjectInstance in interface javax.naming.spi.ObjectFactory
Throws:
java.lang.Exception

createService

public Service (src)  createService(java.net.URL wsdlDocumentLocation,
                             QName (src)  serviceName)
                      throws ServiceException (src) 
Create a Service instance.

Specified by:
createService in class ServiceFactory (src)
Parameters:
wsdlDocumentLocation - URL for the WSDL document location for the service
serviceName - QName for the service.
Returns:
Service.
Throws:
ServiceException (src) - If any error in creation of the specified service

loadService

public Service (src)  loadService(java.lang.Class aClass)
                    throws ServiceException (src) 
Description copied from class: ServiceFactory (src)
Create an instance of the generated service implementation class for a given service interface, if available.

Specified by:
loadService in class ServiceFactory (src)
Parameters:
aClass - Service interface
Returns:
A Service
Throws:
ServiceException (src) - If there is any error while creating the specified service, including the case where a generated service implementation class cannot be located

loadService

public Service (src)  loadService(java.net.URL url,
                           java.lang.Class aClass,
                           java.util.Properties properties)
                    throws ServiceException (src) 
Description copied from class: ServiceFactory (src)
Create an instance of the generated service implementation class for a given service interface, if available. An implementation may use the provided wsdlDocumentLocation and properties to help locate the generated implementation class. If no such class is present, a ServiceException will be thrown.

Specified by:
loadService in class ServiceFactory (src)
Parameters:
url - URL for the WSDL document location for the service or null
aClass - Service interface
properties - A set of implementation-specific properties to help locate the generated service implementation class
Returns:
A Service
Throws:
ServiceException (src) - If there is any error while creating the specified service, including the case where a generated service implementation class cannot be located

loadService

public Service (src)  loadService(java.net.URL url,
                           QName (src)  qName,
                           java.util.Properties properties)
                    throws ServiceException (src) 
Description copied from class: ServiceFactory (src)
Create an instance of the generated service implementation class for a given service, if available. The service is uniquely identified by the wsdlDocumentLocation and serviceName arguments. An implementation may use the provided properties to help locate the generated implementation class. If no such class is present, a ServiceException will be thrown.

Specified by:
loadService in class ServiceFactory (src)
Parameters:
url - URL for the WSDL document location for the service or null
qName - Qualified name for the service
properties - A set of implementation-specific properties to help locate the generated service implementation class
Returns:
A Service
Throws:
ServiceException (src) - If there is any error while creating the specified service, including the case where a generated service implementation class cannot be located

createService

public Service (src)  createService(QName (src)  serviceName)
                      throws ServiceException (src) 
Create a Service instance. Since the WSDL file is not provided here, the Service object returned is quite simpleminded. Likewise, the Call object that service.createCall will return will also be simpleminded. The caller must explicitly fill in all the info on the Call object (ie., endpoint address, etc.).

Specified by:
createService in class ServiceFactory (src)
Parameters:
serviceName - QName for the service
Returns:
Service.
Throws:
ServiceException (src) - If any error in creation of the specified service