if ((targetServices[0].getXAddresses() != null) && (targetServices[0].getXAddresses().length > 0)) {
targetURI = getTargetURI(targetServices[0].getXAddresses(),
(String) messageContext.getProperty(DiscoveryConstants.DISCOVERY_SCHEME));
} else {
// get the epr using a resolve request
TargetService targetService = discoveryClient.resolve(targetServices[0].getEpr().getAddress());
if ((targetService.getXAddresses() != null) && (targetService.getXAddresses().length > 0)) {
targetURI = getTargetURI(targetService.getXAddresses(),
(String) messageContext.getProperty(DiscoveryConstants.DISCOVERY_SCHEME));
} else {
throw new AxisFault("Resolve message did not return the service location");