package com.cervantesvirtual.rdf.rda2geonames;

import org.geonames.FeatureClass;
import org.geonames.ToponymSearchCriteria;
import org.geonames.ToponymSearchResult;
import org.geonames.WebService;

public class GeonameService 
{
	//private static String username = "gcandela";
	private static String username = "gcandela2";
	private static int maxResults = 5;
	
    public ToponymSearchResult search(String query){
        WebService.setUserName(username);
        ToponymSearchResult searchResult = null;
        
        if(!query.isEmpty()){
    		
			ToponymSearchCriteria searchCriteria = new ToponymSearchCriteria();
		    searchCriteria.setQ(query);
		    searchCriteria.setLanguage("es");
		    searchCriteria.setMaxRows(maxResults);
		    searchCriteria.setFeatureClass(FeatureClass.P);
		    
			try {
				searchResult = WebService.search(searchCriteria);
				
			} catch (Exception e) {
				System.out.println("Error Geonames webservice." + e.getMessage());
			}
		}
        return searchResult;

    }
}

@@ -228,10 +228,8 @@
 %0A%7B%0A%09
-//
 priv
@@ -262,63 +262,16 @@
  = %22
-gcandela%22;%0A%09private static String username = %22gcandela2
+yourUser
 %22;%0A%09

Update GeonameService.java