- /////////
- print(true,"Test Connections driven by AAFLocator");
- URI serviceURI = uri(access,"service");
-
- for (URI uri : new URI[] {
- serviceURI,
- uri(access,"token"),
- uri(access,"introspect"),
- uri(access,"cm"),
- uri(access,"gui"),
- uri(access,"fs"),
- uri(access,"hello")
- }) {
- Locator<URI> locator = new AAFLocator(si, uri);
- try {
- connectTest(locator, uri);
- } catch (Exception e) {
- e.printStackTrace();
- System.err.flush();
- }
- }
-
- /////////
- print(true,"Test Service for Perms driven by AAFLocator");
- Locator<URI> locator = new AAFLocator(si,serviceURI);
- for (SecuritySetter<HttpURLConnection> ss : lss) {
- permTest(locator,ss);
- }
-
- //////////
- print(true,"Test essential BasicAuth Service call, driven by AAFLocator");
- boolean hasBath=false;
- for (SecuritySetter<HttpURLConnection> ss : lss) {
- if (ss instanceof HBasicAuthSS) {
- hasBath=true;
- basicAuthTest(new AAFLocator(si, serviceURI),ss);
- }
- }
- if(!hasBath) {
- System.out.println("No User/Password to test");
- }
+ /////////
+ print(true,"Test Connections driven by AAFLocator");
+ String serviceURI = aaf_urls.get(Config.AAF_URL);
+
+ for (String url : new String[] {
+ serviceURI,
+ aaf_urls.get(Config.AAF_OAUTH2_TOKEN_URL),
+ aaf_urls.get(Config.AAF_OAUTH2_INTROSPECT_URL),
+ aaf_urls.get(Config.AAF_URL_CM),
+ aaf_urls.get(Config.AAF_URL_GUI),
+ aaf_urls.get(Config.AAF_URL_FS),
+ aaf_urls.get(Config.AAF_URL_HELLO)
+ }) {
+ URI uri = new URI(url);
+ Locator<URI> locator = new AAFLocator(si, uri);
+ try {
+ connectTest(locator, uri);
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.err.flush();
+ }
+ }
+
+ /////////
+ print(true,"Test Service for Perms driven by AAFLocator");
+ Locator<URI> locator = new AAFLocator(si,new URI(serviceURI));
+ for (SecuritySetter<HttpURLConnection> ss : lss) {
+ permTest(locator,ss);
+ }
+
+ //////////
+ print(true,"Test essential BasicAuth Service call, driven by AAFLocator");
+ boolean hasBath=false;
+ for (SecuritySetter<HttpURLConnection> ss : lss) {
+ if (ss instanceof HBasicAuthSS) {
+ hasBath=true;
+ basicAuthTest(new AAFLocator(si, new URI(serviceURI)),ss);
+ }
+ }
+ if(!hasBath) {
+ System.out.println("No User/Password to test");
+ }