Package javax.xml.rpc
Interface Service
- All Known Implementing Classes:
Service
public interface Service
Service class acts as a factory of the following:
- Dynamic proxy for the target service endpoint.
- Instance of the type
javax.xml.rpc.Callfor the dynamic invocation of a remote operation on the target service endpoint. - Instance of a generated stub class
- Version:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionCreates aCallobject not associated with specific operation or target service endpoint.createCall(QName portName) Creates aCallinstance.createCall(QName portName, String operationName) Creates aCallinstance.createCall(QName portName, QName operationName) Creates aCallinstance.Call[]Gets an array of preconfiguredCallobjects for invoking operations on the specified port.Returns the configuredHandlerRegistryinstance for thisServiceinstance.The getPort method returns either an instance of a generated stub implementation class or a dynamic proxy.The getPort method returns either an instance of a generated stub implementation class or a dynamic proxy.getPorts()Returns anIteratorfor the list ofQNames of service endpoints grouped by this service.Gets the name of this Service.Gets theTypeMappingRegistryfor thisServiceobject.Gets location of the WSDL document for this Service.
-
Method Details
-
getPort
The getPort method returns either an instance of a generated stub implementation class or a dynamic proxy. A service client uses this dynamic proxy to invoke operations on the target service endpoint. TheserviceEndpointInterfacespecifies the service endpoint interface that is supported by the created dynamic proxy or stub instance.- Parameters:
portName- Qualified name of the service endpoint in the WSDL service descriptionserviceEndpointInterface- Service endpoint interface supported by the dynamic proxy or stub instance- Returns:
- java.rmi.Remote Stub instance or dynamic proxy that supports the specified service endpoint interface
- Throws:
ServiceException- This exception is thrown in the following cases:- If there is an error in creation of the dynamic proxy or stub instance
- If there is any missing WSDL metadata as required by this method
- Optionally, if an illegal
serviceEndpointInterfaceorportNameis specified
-
getPort
The getPort method returns either an instance of a generated stub implementation class or a dynamic proxy. The parameterserviceEndpointInterfacespecifies the service endpoint interface that is supported by the returned stub or proxy. In the implementation of this method, the JAX-RPC runtime system takes the responsibility of selecting a protocol binding (and a port) and configuring the stub accordingly. The returnedStubinstance should not be reconfigured by the client.- Parameters:
serviceEndpointInterface- Service endpoint interface- Returns:
- Stub instance or dynamic proxy that supports the specified service endpoint interface
- Throws:
ServiceException-- If there is an error during creation of stub instance or dynamic proxy
- If there is any missing WSDL metadata as required by this method
- Optionally, if an illegal
serviceEndpointInterfaceis specified
-
getCalls
Gets an array of preconfiguredCallobjects for invoking operations on the specified port. There is oneCallobject per operation that can be invoked on the specified port. EachCallobject is pre-configured and does not need to be configured using the setter methods onCallinterface.Each invocation of the
getCallsmethod returns a new array of preconfiguredCallobjectsThis method requires the
Serviceimplementation class to have access to the WSDL related metadata.- Parameters:
portName- Qualified name for the target service endpoint- Returns:
- Call[] Array of pre-configured Call objects
- Throws:
ServiceException- If this Service class does not have access to the required WSDL metadata or if an illegalportNameis specified.
-
createCall
Creates aCallinstance.- Parameters:
portName- Qualified name for the target service endpoint- Returns:
- Call instance
- Throws:
ServiceException- If any error in the creation of theCallobject
-
createCall
Creates aCallinstance.- Parameters:
portName- Qualified name for the target service endpointoperationName- Qualified Name of the operation for which thisCallobject is to be created.- Returns:
- Call instance
- Throws:
ServiceException- If any error in the creation of theCallobject
-
createCall
Creates aCallinstance.- Parameters:
portName- Qualified name for the target service endpointoperationName- Name of the operation for which thisCallobject is to be created.- Returns:
- Call instance
- Throws:
ServiceException- If any error in the creation of theCallobject
-
createCall
Creates aCallobject not associated with specific operation or target service endpoint. ThisCallobject needs to be configured using the setter methods on theCallinterface.- Returns:
- Call object
- Throws:
ServiceException- If any error in the creation of theCallobject
-
getServiceName
QName getServiceName()Gets the name of this Service.- Returns:
- Qualified name of this service
-
getPorts
Returns anIteratorfor the list ofQNames of service endpoints grouped by this service.- Returns:
- Returns
java.util.Iteratorwith elements of typejavax.xml.namespace.QName - Throws:
ServiceException- If this Service class does not have access to the required WSDL metadata
-
getWSDLDocumentLocation
URL getWSDLDocumentLocation()Gets location of the WSDL document for this Service.- Returns:
- URL for the location of the WSDL document for this service
-
getTypeMappingRegistry
TypeMappingRegistry getTypeMappingRegistry()Gets theTypeMappingRegistryfor thisServiceobject. The returnedTypeMappingRegistryinstance is pre-configured to support the standard type mapping between XML and Java types types as required by the JAX-RPC specification.- Returns:
- The TypeMappingRegistry for this Service object.
- Throws:
UnsupportedOperationException- if theServiceclass does not support the configuration ofTypeMappingRegistry.
-
getHandlerRegistry
HandlerRegistry getHandlerRegistry()Returns the configuredHandlerRegistryinstance for thisServiceinstance.- Returns:
- HandlerRegistry
- Throws:
UnsupportedOperationException- - if theServiceclass does not support the configuration of aHandlerRegistry
-