Top Description Methods
javax.xml.rpc

public Interface Service

Imports
javax.xml.namespace.QName, java.net.URL, java.util.Iterator, javax.xml.rpc.encoding.TypeMappingRegistry, javax.xml.rpc.handler.HandlerRegistry

Service class acts as a factory of the following:
Author
Rahul Sharma
Version
1.0
See Also
javax.xml.rpc.Call, javax.xml.rpc.Stub

Method Summary

Modifier and TypeMethod and Description
public Call

Returns:

Call instance
createCall
(QName
Qualified name for the target service endpoint
portName
)

Creates a Call instance.

public Call

Returns:

Call instance
createCall
(QName
Qualified name for the target service endpoint
portName
,
QName
Qualified Name of the operation for which this Call object is to be created.
operationName
)

Creates a Call instance.

public Call

Returns:

Call instance
createCall
(QName
Qualified name for the target service endpoint
portName
,
String
Name of the operation for which this Call object is to be created.
operationName
)

Creates a Call instance.

public Call

Returns:

Call object
createCall
()

Creates a Call object not associated with specific operation or target service endpoint.

public Call[]

Returns:

Call[] Array of pre-configured Call objects
getCalls
(QName
Qualified name for the target service endpoint
portName
)

Gets an array of preconfigured Call objects for invoking operations on the specified port.

public HandlerRegistry

Returns:

HandlerRegistry
getHandlerRegistry
()

Returns the configured HandlerRegistry instance for this Service instance.

public Remote

Returns:

java.rmi.Remote Stub instance or dynamic proxy that supports the specified service endpoint interface
getPort
(QName
Qualified name of the service endpoint in the WSDL service description
portName
,
Class<T>
Service endpoint interface supported by the dynamic proxy or stub instance
serviceEndpointInterface
)

The getPort method returns either an instance of a generated stub implementation class or a dynamic proxy.

public Remote

Returns:

Stub instance or dynamic proxy that supports the specified service endpoint interface
getPort
(Class<T>
Service endpoint interface
serviceEndpointInterface
)

The getPort method returns either an instance of a generated stub implementation class or a dynamic proxy.

public Iterator<E>

Returns:

Returns java.util.Iterator with elements of type javax.xml.namespace.QName
getPorts
()

Returns an Iterator for the list of QNames of service endpoints grouped by this service

public QName

Returns:

Qualified name of this service
getServiceName
()

Gets the name of this service.

public TypeMappingRegistry

Returns:

The TypeMappingRegistry for this Service object.
getTypeMappingRegistry
()

Gets the TypeMappingRegistry for this Service object.

public URL

Returns:

URL for the location of the WSDL document for this service
getWSDLDocumentLocation
()

Gets the location of the WSDL document for this Service.

Method Detail

createCallback to summary
public Call createCall(QName portName) throws ServiceException

Creates a Call instance.

Parameters
portName:QName

Qualified name for the target service endpoint

Returns:Call

Call instance

Exceptions
ServiceException:
If any error in the creation of the Call object
createCallback to summary
public Call createCall(QName portName, QName operationName) throws ServiceException

Creates a Call instance.

Parameters
portName:QName

Qualified name for the target service endpoint

operationName:QName

Qualified Name of the operation for which this Call object is to be created.

Returns:Call

Call instance

Exceptions
ServiceException:
If any error in the creation of the Call object
createCallback to summary
public Call createCall(QName portName, String operationName) throws ServiceException

Creates a Call instance.

Parameters
portName:QName

Qualified name for the target service endpoint

operationName:String

Name of the operation for which this Call object is to be created.

Returns:Call

Call instance

Exceptions
ServiceException:
If any error in the creation of the Call object
createCallback to summary
public Call createCall() throws ServiceException

Creates a Call object not associated with specific operation or target service endpoint. This Call object needs to be configured using the setter methods on the Call interface.

Returns:Call

Call object

Exceptions
ServiceException:
If any error in the creation of the Call object
getCallsback to summary
public Call[] getCalls(QName portName) 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.

Each invocation of the getCalls method returns a new array of preconfigured Call objects

This method requires the Service implementation class to have access to the WSDL related metadata.

Parameters
portName:QName

Qualified name for the target service endpoint

Returns:Call[]

Call[] Array of pre-configured Call objects

Exceptions
ServiceException:
If this Service class does not have access to the required WSDL metadata or if an illegal portName is specified.
getHandlerRegistryback to summary
public HandlerRegistry getHandlerRegistry()

Returns the configured HandlerRegistry instance for this Service instance.

Returns:HandlerRegistry

HandlerRegistry

Exceptions
UnsupportedOperationException:
if the Service class does not support the configuration of a HandlerRegistry
getPortback to summary
public Remote getPort(QName portName, Class<T> 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. The serviceEndpointInterface specifies the service endpoint interface that is supported by the created dynamic proxy or stub instance.

Parameters
portName:QName

Qualified name of the service endpoint in the WSDL service description

serviceEndpointInterface:Class<T>

Service endpoint interface supported by the dynamic proxy or stub instance

Returns:Remote

java.rmi.Remote Stub instance or dynamic proxy that supports the specified service endpoint interface

Exceptions
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 or portName is specified
See Also
java.lang.reflect.Proxy, java.lang.reflect.InvocationHandler
getPortback to summary
public Remote getPort(Class<T> serviceEndpointInterface) throws ServiceException

The getPort method returns either an instance of a generated stub implementation class or a dynamic proxy. The parameter serviceEndpointInterface specifies the service endpoint interface that is supported by the returned stub or proxy. In the implementation of this method, the Jakarta XML RPC runtime system takes the responsibility of selecting a protocol binding (and a port) and configuring the stub accordingly. The returned Stub instance should not be reconfigured by the client.

Parameters
serviceEndpointInterface:Class<T>

Service endpoint interface

Returns:Remote

Stub instance or dynamic proxy that supports the specified service endpoint interface

Exceptions
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
getPortsback to summary
public Iterator<E> getPorts() throws ServiceException

Returns an Iterator for the list of QNames of service endpoints grouped by this service

Returns:Iterator<E>

Returns java.util.Iterator with elements of type javax.xml.namespace.QName

Exceptions
ServiceException:
If this Service class does not have access to the required WSDL metadata
getServiceNameback to summary
public QName getServiceName()

Gets the name of this service.

Returns:QName

Qualified name of this service

getTypeMappingRegistryback to summary
public TypeMappingRegistry getTypeMappingRegistry()

Gets the TypeMappingRegistry for this Service object. The returned TypeMappingRegistry instance is pre-configured to support the standard type mapping between XML and Java types types as required by the Jakarta XML RPC specification.

Returns:TypeMappingRegistry

The TypeMappingRegistry for this Service object.

Exceptions
UnsupportedOperationException:
if the Service class does not support the configuration of TypeMappingRegistry.
getWSDLDocumentLocationback to summary
public URL getWSDLDocumentLocation()

Gets the location of the WSDL document for this Service.

Returns:URL

URL for the location of the WSDL document for this service