* @throws Exception if an exception occurs
*/
@Override
public void collectMetadata(ServiceHandlerFactory handlerFactory, ServiceInfo serviceInfo)
throws Exception {
ImageServerBindingStub stub =
getCredentials()==null || getCredentials().getUsername().length()==0 || getCredentials().getPassword().length()==0?
new ImageServerBindingStub(serviceInfo.getSoapUrl()):
new ImageServerBindingStub(serviceInfo.getSoapUrl(), getCredentials().getUsername(), getCredentials().getPassword());
serviceInfo.getKeywords().add(serviceInfo.getType());
serviceInfo.addKeywords("liveData,service,image",",");
ImageServiceInfo imageServiceInfo = stub.getServiceInfo();
//serviceInfo.setName(imageServiceInfo.getName());
serviceInfo.setDescription(imageServiceInfo.getDescription());
serviceInfo.setEnvelope(imageServiceInfo.getExtent());
// TODO: thumbnail url?