If address is validated, we create a new InOut exchange with creditGateWay
as the LocalPart and send it to the deliveryChannel.
In both the scenarios above, note that we set the (Address Validation)
messageExchange status to "done". The code listing in the following shows
processing the address validation response:
public class SyncVoipBroker extends ComponentSupport
implements MessageExchangeListener
{
private void processAddressValidationResponse(MessageExchange
exchange) throws MessagingException
{
String correlationId = (String) getProperty(exchange,
Constants.CORRELATION_ID_KEY);
System.out.println("SyncVoipBroker.
processAddressValidationResponse.correlationId :
" + correlationId);
boolean isAaddressValidated = ((Boolean)
getOutProperty(exchange,
Constants.ADDRESS_VALIDATED_KEY)).booleanValue();
MessageExchange rootExchange = null;
Sample Service Aggregation
[ 358 ]
if(isAaddressValidated)
{
InOut inout = createInOutExchange(new QName(
creditGatewayNamespaceURI,
creditGatewayLocalPart), null, null);
inout.setProperty(Constants.CORRELATION_ID_KEY,
correlationId);
NormalizedMessage msg = inout.
Pages:
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472