· Jun 15, 2016

Capture the output from REST Operation



I am looking for a routine or global that can help me see what is the  REST Operation output. Similar to  ISCSOAP for SOAP web services operation.




Discussion (9)0
Log in or sign up to continue

The business operation's "Archive I/O" setting might do what you want, depending on what messages you're passing around. This will add some extra things to the message trace showing what the input to services or the output from operations is.

You can enable I/O archiving in the business operation's settings on the production configuration page, at the end of the "Development and Debugging" section.

The REST operation uses adapter EnsLib.HTTP.OutboundAdapter.  This adapter class internally uses %Net.HttpRequest method Send to send the http request.  That method takes a debug argument telling it to just print the HTTP request rather than sending it to the server.  EnsLib.HTTP.OutboundAdapter has a parameter DEBUG which is passed as that debug argument.  One thing you could do is temporarily change this parameter to 1 and run the operation in the foreground (only works on windows instances), which will cause the operation to pass that 1 as the debug argument to %Net.HttpRequest method Send.  This should print out the request to terminal rather than sending it to the server.