while(iterator.hasNext()){
try{
Request request = new Request(Method.GET,"http://info.teragrid.org/restdemo/xml/tg/services/"+iterator.next());
Client client = new Client(Protocol.HTTP);
Response response = client.handle(request);
DomRepresentation representation = response.getEntityAsDom();
Document document = representation.getDocument();
NodeList nodeList = document.getElementsByTagName("Service");
String currentHostName = (String) FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("hostInfo:hostName");
for(int i=0;i<nodeList.getLength();i++){
String resource = nodeList.item(i).getAttributes().getNamedItem("ResourceID").getNodeValue();
if(resource.equalsIgnoreCase(currentHostName)){