Modeling fault parameters in service operations
You can model fault parameters in service operations
in UML models, and then run the UML-to-WSDL transformation to transform
these parameters into Web Services Description Language (WSDL) fault
messages.
About this task
You can run the transformation by invoking a UML-to-WSDL transformation configuration or by invoking a transformation that invokes the UML-to-WSDL transformation, such as the UML-to-SOA or UML-to-SCA transformation.
Procedure
- In the Project Explorer view or in the diagram editor, select an out parameter of a UML operation.
- In the Properties view, click the Advanced tab; then set the IsException property to true.
- Click .
- Run the transformation configuration: In the Project Explorer view, right-click the transformation configuration (.tc) file; then click .
- View the proposed changes in the Merge the Transformation Output window, use the controls to copy changes from left to right, and then click OK.
Results
In the target project where the transformation generated
the output, open the .wsdl file that corresponds
to the root package or model. Verify that the file contains a wsdl:portType tag
that contains the fault message, as shown in the following excerpt:
<wsdl:portType name="Interface1">
<wsdl:operation name="Operation1">
<wsdl:input message="tns:Interface1Operation1Request"/>
<wsdl:output message="tns:Interface1Operation1Response"/>
<wsdl:fault message="tns:Interface1Operation1Parameter2" name="Operation1Fault"/>
</wsdl:operation>