Configuring the Throw Fault Task
Procedure
- Select the ThrowFault task (at the end of the Otherwise path in the AddressService.mediation tab) and click the Browse button in the General tab of the Properties view.
- The Select a WSDL Message dialog displays. The first three messages are listed as InvalidCountryFaultMessage; a full pathname displays if you highlight the message. Select the message that corresponds to the AddressService.wsdl file and click OK.
- Select the Transform task. On the Input tab of the Properties view, expand the MessageData tree, so that all parameters are visible.
-
This message has to be modified to include an error message as well as the value of the invalid country code. To do this:
- Select the Functions tab and expand String Functions.
-
- Drag and drop a concat string function to the XPath Expression column next to invalidCountry.
-
-
In the XPath Expression text box, type this return message to replace the
<<string1>> placeholder, enclosing the message in double quotes:
"Invalid country supplied: "
- Click the Data Source tab drag and drop country from the Message Data tree into the <<string2>> placeholder.
-
- Click the Show Check and Repair icon .
- One error displays. Select the checkbox in the Fix column for the displayed error and click OK.
- Save the project.
Next topic: Adding Transform tasks in the Output Path View
Previous topic: Adding Transform Tasks in the Input Path View
Copyright © Cloud Software Group, Inc. All rights reserved.