code: public static void runExample(
        AdWordsServicesInterface adWordsServices, AdWordsSession session) throws RemoteException {
      // Get the CampaignService.
      CampaignServiceInterface campaignService =
          adWordsServices.get(session, CampaignServiceInterface.class);
  
      ServiceQuery serviceQuery =
          new ServiceQuery.Builder()
              .fields(CampaignField.Id, CampaignField.Name, CampaignField.Status)
              .orderBy(CampaignField.Name)
              .limit(0, PAGE_SIZE)
              .build();
  
      CampaignPage page = null;
      do {
        serviceQuery.nextPage(page);
        // Get all campaigns.
        page = campaignService.query(serviceQuery.toString());
  
        // Display campaigns.
        if (page.getEntries() != null) {
          for (Campaign campaign : page.getEntries()) {
            System.out.printf("Campaign with name '%s' and ID %d was found.%n", campaign.getName(),
                campaign.getId());
          }
        } else {
          System.out.println("No campaigns were found.");
        }
      } while (serviceQuery.hasNext(page));
    }
docs: Runs the example.
  
  @param adWordsServices the services factory.
  @param session the session.
  @throws ApiException if the API request failed with one or more service errors.
  @throws RemoteException if the API request failed due to other errors.