The Now Platform® Washington DC release is live. Watch now!
03-17-2015 07:46 AM
Hi,
I'm trying to figure out when outbound REST calls are sent via the ecc queue. I used the canned Rest service from the sandbox.
I tried this script in a UI action and was expecting to see the results in the ecc queue table but I didn't see anything
try {
var r = new sn_ws.RESTMessageV2('Yahoo Finance', 'get');
r.setStringParameter('symbol', 'IBM');
var response = r.execute();
var responseBody = response.getBody();
var httpStatus = response.getStatusCode();
} catch (ex) {
var message = ex.getMessage();
}
I've noticed that outbound calls via Mid-server are visible in the ecc_queue.
Thanks,
D.
03-17-2015 01:18 PM
The ECC Queue is always used for MID Server REST calls. You can add your REST messages into the ECC Queue so you can see what's outbound by using r.execute(true). It's not really using the ECC Queue since you're not necessarily going over a MID Server, but it will show up in the ECC Queue and you can see exactly what you're sending to the 3rd party application.
03-19-2015 12:57 AM
03-19-2015 07:29 AM
Give it a try. You should see the sent data in your ECC Queue.
-Chris
03-22-2015 10:58 AM
Hi,
REST messages can be sent to an endpoint either from the instance or from a MID Server (for example if your endpoints are inside your network).
Whether a REST message will use MID Server or not is defined in the REST Funciton Message (System Web Services > Outbound > REST Message > (edit a message) > (edit a function from the related list) ), there is a field "Use MID Server" where you can enter a MID Server. Make sure that your MID Server has capability REST.
In case that the message is handled via MID Server you will observe an output (and hopefully an input) probe in the ECC Queue with topic "RESTProbe" and name "<function>" where function is "get/post/put/delete".
Cheers,
Carlos