getProperty(
Constants.CORRELATION_ID_KEY);
System.out.println("AddressValidationService.transform.
correlationId : " + correlationId);
Source content = in.getContent();
String contentString = null;
AddressTO addressTO = null;
if(content instanceof StreamSource)
{
contentString = XMLUtil.formatStreamSource(
(StreamSource) content);
addressTO = (AddressTO)XStreamUtil.
xmlToObject(contentString);
}
else
{
log.debug("AddressValidationService-content.getClass() : " +
content.getClass() + " ; content : " + content);
}
out.setProperty(Constants.ADDRESS_VALIDATED_KEY, Boolean.TRUE);
return true;
}
}
When the Address service returns, the onMessageExchange method in the
broker will be invoked (Sequence 1). Now as the broker component is in
the consumer role and the LocalPart is "address", the control flows to the
processAddressValidationResponse which is given in Sequence 4.
Chapter 16
[ 357 ]
In processAddressValidationResponse we check whether the address is
validated. If not, we set the XML message "
" at the
normalizedMessage to the Root Exchange so that the message exchange flow will
be completed and control flows back to the deliveryChannel first and then to the
client.
Pages:
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471