WSDL-Defined Faults
HydraExpress generates code to facilitate fault handling for any faults defined in the WSDL file. HydraExpress generates a class for each defined fault message element, with the name of the class being the message name with the string _message appended: message-name_message.
For example, for this WSDL defined fault message:
 
<operation name="faultMethod" parameterOrder="in1">
<input message="tns:faultMethodRequest"/>
<output message="tns:faultMethodResponse"/>
<fault name="InvalidRequest" message="tns:InvalidRequest"/>
<fault name="WrongParameter" message="tns:WrongParameter"/>
</operation>
The generated class is InvalidRequest_message, deriving from the HydraExpress class rwsf::Fault. Each class contains the following datatypes, with corresponding accessor methods inherited from rwsf::Fault:
*A fault code, corresponding to the code element required in SOAP fault messages. Accessor methods are getFaultCode() and getFaultCodeAsString().
*a fault string, corresponding to the human-readable string element required in SOAP fault messages. Accessor method is getFaultString().
*one or more message parts, corresponding to the parts specified for this fault message type in the WSDL. These message parts become entries in the detail element of the SOAP message. Accessor methods are get<part-name>() where part-name is the name of the WSDL message part that adds additional detail for the fault message.