Return Messages
The Web method in the Web service returns a string that DPS application code processes to determine whether to continue with the submit operation or to abort it.
The return message is required to be in XML format to process and display in DPS. The required format for the return XML messages is shown in the examples.
Note that If you use DPS Touch Time, the error or warning messages that you create cannot contain the pipe line (|) character. This character is reserved for messages that are returned from DPS Core timesheet validation to Touch Time.
Return Message for Successful Custom Data Validation
If there were no errors or warnings during custom data validation, DPS saves the timesheet and marks it as submitted. The method returns an empty string ('') or the following empty error XML message:
<errors></errors>
Return Messages for Unsuccessful Custom Data Validation
If any of the custom data validation rules fail, the Web method returns an error or warning message as a string. Those messages are displayed in DPS for the user making the submission. In this event, DPS does not save the submission and does not complete the ‘submit’ transaction.
The following example shows the format for error messages displayed in DPS.
<errors> <error>Error Message 1</error> <error>Error Message 2</error> <error>Error Message 3</error> </errors>
The XML format for warning messages is exactly the same as the format used for error messages, but an extra attribute is used, as shown in the following example. The XML attribute ‘warning’ is used to indicate that the message returned is to be displayed as a warning in DPS.
<errors warning=”y”> <error>Warning Message 1</error> <error>Warning Message 2</error> <error>Warning Message 3</error> </errors>