//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());
}
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.