WAS v8.5 > Reference > Developer detailed usage informationWSIFService interface
The WSIFService interface can generate an instance of the WSIFOperation interface to use for a particular invocation of a service operation.
The WSIF service stores a list of providers that can each generate a WSIF operation for a particular Web Services Description Language (WSDL) binding. This service looks up providers by the provider type. For example, the service knows about one provider that handles SOAP ports, and other providers that handle Java ports defined. In a managed environment, the container can configure the WSIFService interface.
For more information about the WSIFService interface, see the generated API documentation supplied with WSIF (see the Apache WSIF website).
A WSIFService implementation can choose a preferred port based on a number of criteria. The WSIFService implementation can set the preferred port, or it can be set by calling the setPreferredPort method.
The getPort method returns an instance of the WSIFPort class used to invoke a service on the port. Variants of the getPort method are used to define the characteristics of the port to be created:
- the getPort method with no arguments returns the preferred port.
- the getPort method with a string argument returns the port named by the string containing the WSDL identifier for the selected port.
The return value is null if the port name is not valid.
If a port is chosen (either by the WSIFService implementation, or by the setPreferredPort method), then the WSIFService implementation validates the relevant provider exists and is configured. If the provider fails this validation check, the WSIFService interface chooses any other port for which a provider is defined. For example, if the preferred port is SOAP over JMS but the JMS libraries are not available, then WSIF chooses another port. If no preferred port is set, or the preferred port is not available, the WSIF implementation chooses the first available port listed in the WSDL.
The getAvailablePortNames() method returns, as an iteration of strings, the list of WSDL port names filtered by the set of available providers.
The getDefinition() method returns the WSDL definition for the service. If the WSDL definition is not available, this method returns null.
Related concepts:
WSIF and WSDL
Reference:
WSIFServiceFactory class
WSIFPort interface
WSIFOperation interface
Related information: