QName[] types, URI[] scopes) throws Exception {
if (name == null || "".equals(name)) {
throw new Exception("The name has not been specified for the discovery proxy");
}
ProbeDetails probe = new ProbeDetails();
if (types != null) {
String[] typeValues = new String[types.length];
for (int i = 0; i < types.length; i++) {
typeValues[i] = types[i].toString();
}
probe.setTypes(typeValues);
}
if (scopes != null) {
String[] scopeValues = new String[scopes.length];
for (int i = 0; i < scopes.length; i++) {
scopeValues[i] = scopes[i].toString();
}
probe.setScopes(scopeValues);
}
TargetServiceDetails[] details = stub.probeDiscoveryProxy(name, probe);
if (details == null || details.length == 0 || details[0] == null) {
return null;