Prev | Current Page 466 | Next

Binildas A Christudas

"Service-Oriented Java Business Integration"


Sample Service Aggregation
[ 364 ]
get(correlationId);
done(exchange);
stack--;
if(((creditauthorized != null) &&
!(creditauthorized.equals(Boolean.TRUE)))
||
((goodhistory != null) &&
!(goodhistory.equals(Boolean.TRUE))))
{
creditVetoed = true;
System.out.println("SyncVoipBroker.processServiceRequest -
creditVetoed : " + creditVetoed);
}
if(0 == stack)
{
NormalizedMessage response = rootExchange.createMessage();
if(creditVetoed)
{
response.setContent(new StringSource(
""));
}
else
{
response.setContent(new StringSource(
""));
}
rootExchange.setMessage(response, "out");
send(rootExchange);
aggregations.remove(correlationId);
}
}
}
Here, based on the outcome of the previous service responses we can decide
whether the service can be provisioned or not and accordingly we can create an XML
message. Now comes the difference??”we create a normalized message out of the
Root Exchange (we are not going to create a new message exchange, since we are
almost done with the process), set the XML message as its content and call send on
the rootExchange.


Pages:
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478