-
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.Call
for the dynamic invocation of a remote operation on the target service endpoint. - Instance of a generated stub class
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description Call
createCall()
Creates aCall
object not associated with specific operation or target service endpoint.Call
createCall(QName portName)
Creates aCall
instance.Call
createCall(QName portName, QName operationName)
Creates aCall
instance.Call
createCall(QName portName, String operationName)
Creates aCall
instance.Call[]
getCalls(QName portName)
Gets an array of preconfiguredCall
objects for invoking operations on the specified port.HandlerRegistry
getHandlerRegistry()
Returns the configuredHandlerRegistry
instance for thisService
instance.Remote
getPort(Class serviceEndpointInterface)
The getPort method returns either an instance of a generated stub implementation class or a dynamic proxy.Remote
getPort(QName portName, Class serviceEndpointInterface)
The getPort method returns either an instance of a generated stub implementation class or a dynamic proxy.Iterator
getPorts()
Returns anIterator
for the list ofQName
s of service endpoints grouped by this serviceQName
getServiceName()
Gets the name of this service.TypeMappingRegistry
getTypeMappingRegistry()
Gets theTypeMappingRegistry
for thisService
object.URL
getWSDLDocumentLocation()
Gets the location of the WSDL document for this Service.
-
-
-
Method Detail
-
getPort
Remote getPort(QName portName, Class serviceEndpointInterface) throws ServiceException
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. TheserviceEndpointInterface
specifies 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
serviceEndpointInterface
orportName
is specified
- See Also:
Proxy
,InvocationHandler
-
getPort
Remote getPort(Class serviceEndpointInterface) throws ServiceException
The getPort method returns either an instance of a generated stub implementation class or a dynamic proxy. The parameterserviceEndpointInterface
specifies 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 returnedStub
instance 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
serviceEndpointInterface
is specified
-
getCalls
Call[] getCalls(QName portName) throws ServiceException
Gets an array of preconfiguredCall
objects for invoking operations on the specified port. There is oneCall
object per operation that can be invoked on the specified port. EachCall
object is pre-configured and does not need to be configured using the setter methods onCall
interface.Each invocation of the
getCalls
method returns a new array of preconfiguredCall
objectsThis method requires the
Service
implementation 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 illegalportName
is specified.
-
createCall
Call createCall(QName portName) throws ServiceException
Creates aCall
instance.- Parameters:
portName
- Qualified name for the target service endpoint- Returns:
- Call instance
- Throws:
ServiceException
- If any error in the creation of theCall
object
-
createCall
Call createCall(QName portName, QName operationName) throws ServiceException
Creates aCall
instance.- Parameters:
portName
- Qualified name for the target service endpointoperationName
- Qualified Name of the operation for which thisCall
object is to be created.- Returns:
- Call instance
- Throws:
ServiceException
- If any error in the creation of theCall
object
-
createCall
Call createCall(QName portName, String operationName) throws ServiceException
Creates aCall
instance.- Parameters:
portName
- Qualified name for the target service endpointoperationName
- Name of the operation for which thisCall
object is to be created.- Returns:
- Call instance
- Throws:
ServiceException
- If any error in the creation of theCall
object
-
createCall
Call createCall() throws ServiceException
Creates aCall
object not associated with specific operation or target service endpoint. ThisCall
object needs to be configured using the setter methods on theCall
interface.- Returns:
- Call object
- Throws:
ServiceException
- If any error in the creation of theCall
object
-
getServiceName
QName getServiceName()
Gets the name of this service.- Returns:
- Qualified name of this service
-
getPorts
Iterator getPorts() throws ServiceException
Returns anIterator
for the list ofQName
s of service endpoints grouped by this service- Returns:
- Returns
java.util.Iterator
with 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 the location of the WSDL document for this Service.- Returns:
- URL for the location of the WSDL document for this service
-
getTypeMappingRegistry
TypeMappingRegistry getTypeMappingRegistry()
Gets theTypeMappingRegistry
for thisService
object. The returnedTypeMappingRegistry
instance 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:
java.lang.UnsupportedOperationException
- if the
Service
class does not support the configuration ofTypeMappingRegistry
.
-
getHandlerRegistry
HandlerRegistry getHandlerRegistry()
Returns the configuredHandlerRegistry
instance for thisService
instance.- Returns:
- HandlerRegistry
- Throws:
- if thejava.lang.UnsupportedOperationException
Service
class does not support the configuration of aHandlerRegistry
-
-
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 11/06/2005, zuletzt geändert 18/08/2025
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-javaee-rf-javax/xml/rpc/Service.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor dieser Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.