Java Example of Retrieving a List of All Content Libraries

The example is based on the code in the ContentUpdate.java sample file.

This example uses the steps that are described in Listing All Content Libraries.

Note: For a complete and up-to-date version of the Java sample code, see the vsphere-automation-sdk-java VMware repository at GitHub.
...
 
// Access the Library Service.
   Library libraryService = vapiAuthHelper.getStubFactory().createStub(Library.class, sessionStubConfig);

// List all content libraries.
   List<String> allLibraries = libraryService.list();
   System.out.println("List of all library identifiers: /n");
   for (String cl : allLibraries) {
         System.out.println(cl);
   }