org.openliberty.wsc
Class WSCUtilities

java.lang.Object
  extended by org.openliberty.wsc.WSCUtilities

public class WSCUtilities
extends java.lang.Object

This class contains a collection of convenience methods designed to make common WSC operations easier. It consists entirely of static methods and is never meant to be instantiated.

Author:
asa

Constructor Summary
WSCUtilities()
           
 
Method Summary
static EndpointReference boostrapDiscoveryEPRFromDefaultAS(AuthenticationService.AuthMechanism authMechanism)
          Attempts to retrieve a Discovery Service Endpoint Reference from the default Authentication Service.
static BaseServiceClient clientForDiscoveryEPR(EndpointReference discoEPR, DiscoveryService.WSFServiceType serviceType)
          This method takes a discovery EndpointReference and a WSFServiceType and returns an instantiated service client.
static java.util.List<EndpointReference> queryDiscoveryServiceForServiceEPRs(DiscoveryService discoService, java.lang.String[] serviceTypes, java.lang.String[] providerIDs, java.lang.String[] securityMechIDs)
          Retrieves a list of EndpointReference objects from the specified Discovery Service using the supplied parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSCUtilities

public WSCUtilities()
Method Detail

clientForDiscoveryEPR

public static BaseServiceClient clientForDiscoveryEPR(EndpointReference discoEPR,
                                                      DiscoveryService.WSFServiceType serviceType)
                                               throws WSCException
This method takes a discovery EndpointReference and a WSFServiceType and returns an instantiated service client.

The process is:

  1. Instantiate, and then send a request to the DiscoveryService for the service type specified
  2. Instantiate a service with the first

Parameters:
discoEPR - the endpoint reference for the discovery service that will be used to discover the specified service
serviceType - an enumerated reference to a WSF service that the client library supports
Returns:
Throws:
WSCException

boostrapDiscoveryEPRFromDefaultAS

public static EndpointReference boostrapDiscoveryEPRFromDefaultAS(AuthenticationService.AuthMechanism authMechanism)
                                                           throws WSCException
Attempts to retrieve a Discovery Service Endpoint Reference from the default Authentication Service.

This convenience method assumes that there are values set in OpenLibertyBootstrap for authenticationServiceUrl, authUsername, and authPassword.

Parameters:
authMechanism -
Returns:
Throws:
WSCException
java.lang.NullPointerException - if authMechanism is null

queryDiscoveryServiceForServiceEPRs

public static java.util.List<EndpointReference> queryDiscoveryServiceForServiceEPRs(DiscoveryService discoService,
                                                                                    java.lang.String[] serviceTypes,
                                                                                    java.lang.String[] providerIDs,
                                                                                    java.lang.String[] securityMechIDs)
Retrieves a list of EndpointReference objects from the specified Discovery Service using the supplied parameters.

Parameters:
discoService -
serviceTypes -
providerIDs -
securityMechIDs -
Returns: