// Get the CampaignAdExtensionService.
CampaignAdExtensionServiceInterface campaignAdExtensionService =
adWordsServices.get(session, CampaignAdExtensionServiceInterface.class);
// Get the GeoLocationService.
GeoLocationServiceInterface geoLocationService =
adWordsServices.get(session, GeoLocationServiceInterface.class);
// Create address.
Address address = new Address();
address.setStreetAddress("1600 Amphitheatre Parkway");
address.setCityName("Mountain View");
address.setProvinceCode("US-CA");
address.setPostalCode("94043");
address.setCountryCode("US");
// Create geo location selector.
GeoLocationSelector selector = new GeoLocationSelector();
selector.setAddresses(new Address[] {address});
// Get geo location.
GeoLocation[] geoLocationResult = geoLocationService.get(selector);
GeoLocation geoLocation = geoLocationResult[0];
// Create location extension.
LocationExtension locationExtension = new LocationExtension();
locationExtension.setAddress(geoLocation.getAddress());