Book Image

WS-BPEL 2.0 Beginner's Guide

Book Image

WS-BPEL 2.0 Beginner's Guide

Overview of this book

Table of Contents (19 chapters)
WS-BPEL 2.0 Beginner's Guide
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – validating variables


Let's now implement the variable validation for the BookstoreAResponse, BookstoreBResponse, and AnotherBookstoreResponse variables. We will add the validation immediately after both invocations. This way, we will validate the response from all three service invocations and make sure that all responses conform to the corresponding XML schema definitions and WSDL message types. This way we can detect (and prevent) when a service returns a misformed XML or an XML that does not conform to the schema. Such misformed responses would most likely cause a fault in our BPEL process if we did not detect them.

To add validation, simply drag-and-drop the Validate activity from the right-hand side toolbar to the BPEL process. We should drop it between the <flow> activity and the <if> activity. Next, you should double-click on the Validate activity, enter the required name, and add the variables, as shown:

What just happened?

You have added the validate...