javax.xml.rpc
Interface Service

All Known Implementing Classes:
Service

public interface Service

A service class acts as a factory of the following objects:

The Service implementation class is required to implement java.io.Serializable and javax.naming.Referenceable interfaces to support registration in the JNDI namespace.

Version:
0.1

Method Summary
 Call createCall()
          Creates an empty Call object that needs to be configured using the setter methods on the Call interface.
 Call createCall(QName portName)
          Creates a Call instance.
 Call createCall(QName portName, QName operationName)
          Creates a Call instance.
 Call createCall(QName portName, java.lang.String operationName)
          Creates a Call instance.
 Call[] getCalls()
          Gets an array of preconfigured Call objects for invoking operations on the specified port.
 HandlerRegistry getHandlerRegistry()
          Returns the configured HandlerRegistry instance for this Service instance.
 java.rmi.Remote getPort(java.lang.Class serviceDefInterface)
          The getPort method returns a dynamic proxy for a default service port.
 java.rmi.Remote getPort(QName portName, java.lang.Class proxyInterface)
          The getPort method returns a dynamic proxy for the specified service port.
 java.util.Iterator getPorts()
          Gets the list of qualified names of the ports grouped by this service
 QName getServiceName()
          Gets the name of this Service.
 TypeMappingRegistry getTypeMappingRegistry()
          Gets the TypeMappingRegistry registered with this Service object
 java.net.URL getWSDLDocumentLocation()
          Gets location of the WSDL document for this Service.
 

Method Detail

getPort

public java.rmi.Remote getPort(QName portName,
                               java.lang.Class proxyInterface)
                        throws ServiceException
The getPort method returns a dynamic proxy for the specified service port. A service client uses this dynamic proxy to invoke operations on the target service port. The proxyInterface specifies the service definition interface that is supported by the created dynamic proxy.
Parameters:
portName - - Qualified name of the service port in the WSDL based service description
proxyInterface - - Service definition interface supported by the dynamic proxy
Returns:
Dynamic proxy object that supports the service definition interface that extends the java.rmi.Remote
Throws:
ServiceException - - If the service class fails to create a dynamic proxy

getPort

public java.rmi.Remote getPort(java.lang.Class serviceDefInterface)
                        throws ServiceException
The getPort method returns a dynamic proxy for a default service port. A service client uses this dynamic proxy to invoke operations on the target service port. The serviceDefInterface specifies the service definition interface that is supported by the created dynamic proxy.
Parameters:
serviceDefInterface - - Service definition interface supported by the dynamic proxy
Returns:
Dynamic proxy object that supports the service definition interface that extends the java.rmi.Remote
Throws:
ServiceException - - If the service class fails to create a dynamic proxy

createCall

public Call createCall(QName portName)
                throws ServiceException
Creates a Call instance.
Parameters:
- - The qualified name for the target service port
Returns:
Call object
Throws:
ServiceException - - If the Service class fails to create a Call object

createCall

public Call createCall(QName portName,
                       java.lang.String operationName)
                throws ServiceException
Creates a Call instance.
Parameters:
portName - - The qualified name for the target service port
operationName - - Name of the operation for which this Call object is created.
Returns:
Call object
Throws:
ServiceException - - If the Service class fails to create a Call object

createCall

public Call createCall(QName portName,
                       QName operationName)
                throws ServiceException
Creates a Call instance.
Parameters:
portName - - The qualified name for the target service port
operationName - - QName of the operation for which this Call object is created.
Returns:
Call object
Throws:
ServiceException - - If the Service class fails to create a Call object

createCall

public Call createCall()
                throws ServiceException
Creates an empty Call object that needs to be configured using the setter methods on the Call interface.
Returns:
Call object
Throws:
ServiceException -  

getCalls

public Call[] getCalls()
                throws ServiceException
Gets an array of preconfigured Call objects for invoking operations on the specified port. There is one Call object per operation that can be invoked on the specified port. Each Call object is pre-configured and does not need to be configured using the setter methods on Call interface. This method requires the Service implementation class to have access to the WSDL related metadata.
Parameters:
portName - - Qualified name for the target service endpoint
Throws:
ServiceException - - If this Service class does not have access to the required WSDL metadata or if an illegal portName is specified.

getHandlerRegistry

public HandlerRegistry getHandlerRegistry()
Returns the configured HandlerRegistry instance for this Service instance.
Returns:
HandlerRegistry
Throws:
java.lang.UnsupportedOperationException - - if the Service class does not support the configuration of a HandlerRegistry.

getWSDLDocumentLocation

public java.net.URL getWSDLDocumentLocation()
Gets location of the WSDL document for this Service.
Returns:
Location of the WSDL document for this service

getServiceName

public QName getServiceName()
Gets the name of this Service.
Returns:
Qualified name of this service

getPorts

public java.util.Iterator getPorts()
Gets the list of qualified names of the ports grouped by this service
Returns:
iterator containing list of qualified names of the ports

getTypeMappingRegistry

public TypeMappingRegistry getTypeMappingRegistry()
Gets the TypeMappingRegistry registered with this Service object
Returns:
The configured TypeMappingRegistry or null if no TypeMappingRegistry has been set on the Service object


Copyright © 2001 Apache XML Project. All Rights Reserved.