Return Messages

The Web method in the Web service returns a string that Vantagepoint 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 Vantagepoint. The required format for the return XML messages is shown in the examples.

Note that If you use Vantagepoint 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 Vantagepoint Core timesheet validation to Touch Time.

Return Message for Successful Custom Data Validation

If there were no errors or warnings during custom data validation, Vantagepoint 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 Vantagepoint for the user making the submission. In this event, Vantagepoint does not save the submission and does not complete the ‘submit’ transaction.

Errors

The following example shows the format for error messages displayed in Vantagepoint.

<errors>
	<error>Error Message 1</error>
	<error>Error Message 2</error>
	<error>Error Message 3</error>
</errors>
Warnings

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 Vantagepoint.

<errors warning=”y”>
	<error>Warning Message 1</error>
	<error>Warning Message 2</error>
	<error>Warning Message 3</error>
</errors>