//establish connection to metadata server and deploy services
final String applicationDeploymentName = "Remote Services";
final String[] deploygroups = new String[]{ "BIP Remote Services OMR","BIP Stored Process Service"};
Set deploys = new HashSet();
deploys.add(deploygroups[0]);
deploys.add(deploygroups[1]);
MetadataSourceInterface metadataSource = null;
// Create a metadata source for an Open Metadata Repository
final String serverIdentityPassword = SasPasswordString.encode(
SasPasswordString.SAS001_ENCODING, SERVER_IDENTITY_PASSWORD);
metadataSource = new OMRMetadataSource(SERVER_HOST, SERVER_PORT,
SERVER_IDENTITY_ID, serverIdentityPassword,
SERVER_REPOSITORY_NAME, applicationDeploymentName, deploys
);
// Obtain the discovery service
discoveryService = DiscoveryService.defaultInstance();
// Deploy the remote services using the created metadata source.
ServiceLoader.lookupRemoteDiscoveryServices(metadataSource, discoveryService);
// returns the discovery service
// finds the first 20 services
// ensure that all services are listed
Services srv = mdsfc.getDiscoveryService().findServices(new ServiceTemplate(new Class[] { Object.class}), 20, null);
Iterator it = srv.iterator();
while(it.hasNext())
{
System.out.println(it.next().toString());
}
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.