break;
case END_ELEMENT:
if (SERVICE.equals(reader.getName())) {
if (binding != null) {
if (target == null) {
InvalidReferenceException e = new InvalidReferenceException("No target for service ");
e.setIdentifier(name);
throw e;
}
URI targetURI;
try {
targetURI = new URI(target);
} catch (URISyntaxException e) {
InvalidReferenceException ire = new InvalidReferenceException(target);
ire.setIdentifier(name);
throw ire;
}
// FIXME need a way to specify "remotable" on a service
return new BoundServiceDefinition<Binding>(name,
serviceContract,
false,
binding,
targetURI);
} else if (target != null) {
URI targetURI;
try {
targetURI = new URI(target);
} catch (URISyntaxException e) {
InvalidReferenceException ire = new InvalidReferenceException(target);
ire.setIdentifier(name);
throw ire;
}
return new BindlessServiceDefinition(name, serviceContract, false, targetURI);
} else {