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:

Time for action – validating variables

What just happened?

You have added the validate activity. If you switch to the Source view, you should see the following:

What just happened?
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset