SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 215 | Next

Frank Jennings, David Salter

"Building SOA-Based Composite Applications Using NetBeans IDE 6"

This will be useful later to build your own validation rules before
invoking the partner services. AAPreProcessor Web Service performs a check on
the sectors and sends a reply back to the process stating if the reservation could be
processed. For this example, all reservation requests from 'BLR' to "SFO' are rejected
and auto responder is sent to a predefined e-mail address.
The pre-processing also includes checking if the source and destination sectors are
same before invoking the expensive partner services query operations. You should
have more of these checks in your real applications.
Chapter 10
[ 263 ]
For this purpose, we create another web service AAPreProcessor Web Service that
performs the check. Create an EJB module AAPreProcessor_EJB and create a web
service with just one operation. See the following code:
@WebMethod(operationName = "areSectorsAvailable")
public boolean areSectorsAvailable(@WebParam(name = "source")
String source, @WebParam(name = "destination")
String destination)
{
if(source.equals("BLR") && destination.equals("SFO")){
return false;
}
return true;
}
It returns true if a particular source-destination condition is met.
The pre-processor sets a variable AreSectorsAvailableOut if the sectors are not
available. Add an If activity with the following condition:
( $AreSectorsAvailableOut.


Pages:
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227