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());
locationExtension.setGeoPoint(geoLocation.getGeoPoint());
locationExtension.setEncodedLocation(geoLocation.getEncodedLocation());
locationExtension.setSource(LocationExtensionSource.ADWORDS_FRONTEND);
// You can optionally provide these field(s).
locationExtension.setCompanyName("Google");
locationExtension.setPhoneNumber("650-253-0000");