FindQualifiers findQualifiers = new FindQualifiers();
findQualifiers.getFindQualifier().add("sortByNameDesc");
findQualifiers.getFindQualifier().add("approximateMatch");
int maxServ = 0;
Name r = new Name();
r.setLang("en");
r.setValue(serviceToFind);
FindService findService = new FindService();
findService.setAuthInfo(authenticationToken.getAuthInfo());
findService.getName().add(r);
findService.setFindQualifiers(findQualifiers);
findService.setMaxRows(maxServ);
ServiceList serviceList = inquiryService.findService(findService);
serviceInfos = serviceList.getServiceInfos();
//ServiceInfo serviceInfo = null;
//serviceInfo becomes the first service found?
for (ServiceInfo si : serviceInfos.getServiceInfo())
{
if (serviceInfo == null)
{
serviceInfo = si;
}
Name _name = si.getName().get(0);
System.out.println("ServiceInfo #: " + _name.getValue());
}
}