//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());
}
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.