WSTrace

You define the WSTrace attribute for debugging purposes.

Syntax

WSTrace

Usage

You use this attribute to specify the action of the HTTP TRACE verb for debugging purposes. You set the WSTrace attribute in the ATTRIBUTES() clause of the function.

An output message body is not allowed in the response, so returns must be specified as headers with the WSHeader attribute.

Example using WSTrace

In this example the REST function returns a trace. This can help identify bugs in your code. For example, you might want to check if you can reach the service. The client calls the function using an asterisk (*) in the path.

http://myhost:6394/gas/ws/r/myGroup/myXcf/MyService/*

PUBLIC FUNCTION TraceServer()
   ATTRIBUTES(WSTrace, 
             WSPath = '/*')
   RETURNS(STRING ATTRIBUTES(WSHeader, 
                            WSName = "Debug"))

   RETURN "You've reached the service"
 END FUNCTION