Raghu Kodumuri · 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.




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

Hi, you can use CSPGateway event-log to log request- and response content coming through and from the server.

 Since REST is coming through http you can also use any external network trace tool like tcpdump, wireshark, fiddler, etc.

To test REST services you can use Curl command-line tool or ARC (Advanced REST Client) chrome extension, etc.



Thank you Brend for your response. I want to capture the output from REST operation, not service. I can't use any network capture tool as the data is encrypted. It's https.




HTTP debug proxies can and do work with https traffic, for example Charles. You need to install the certificate for that, but it's definitely doable.

If you are on Ensemble/ HealthShare you could use a REST passthrough service. Your would call the passthrough operation, (non ssl), which would then call your operation (with credentials), and you could see the request to the REST service. Anything passed back would also be returned into the passthrough service.

Passthrough service will not show the HTTP RAW request. Does it?

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.

Thank you for your response. Archive I/O will not capture the RAW Http Request it captures only the message request and response.




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.

Hello Brendan,


Thank you for your response and pointing out the DEBUG. I got what I am looking .