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 211 | Next

Frank Jennings, David Salter

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


Let us create another web service WestAir_WS just like we created NorthAir_WS.
Create an EJB module and create a web service from that module. Drag-and-drop
WestAir_WS on the BPEL diagram to create the partner link.
Building a Sample Application
[ 254 ]
To make our example simple, let us have the same web service operation as
NorthAir Web Service.
Chapter 10
[ 255 ]
Add an If activity to the BPEL diagram and set a condition as shown in the following
screenshot. In our case, the condition returns true if the destination sector matches
'SFO'. If you are comfortable using the BPEL mapper add Equal operator as shown.
For information on using BPEL Mapper, refer to Chapter 5 on BPEL Designer.
Or you can manually set the condition as shown in the following screenshot:
Building a Sample Application
[ 256 ]
Drag-and-drop Invoke calls of both NorthAir Web Service and WestAir Web Service
into the appropriate branches as shown in the following figure.
Chapter 10
[ 257 ]
So, whenever the guest itinerary has its destination sector as 'SFO', NorthAir WS
is invoked. Otherwise WestAir WS is invoked. Now, updating the SouthAir DB,
storing the itinerary and sending a JMS message can happen in flow with the sector
check. So, add a BPEL flow activity and drag-and-drop InvokeSA, StoreInFile, and
SendItinerary invoke blocks to the secondary branch of the flow.


Pages:
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223