Sending data through ECC Queue

aniketaniket
Kilo Contributor

Hi All,

I am trying to create a two way SOAP integration.

I need to send the data through ECC queue. Earlier to fuji I used to write something like:

--------------------------------------------------------------------------------------------------------------

var s = new SOAPMessage('TemperatureConvert', 'TempConvertSoap.FahrenheitToCelsius');

s.setParameter('temperatureF', '100');

s.post(true);

----------------------------------------------------------------------------------------------------------------

So the message would get posted through ECC queue and we could track them.

But now that SOAP V2 has been introduced I am confused as to where should we write this "true" parameter so that the message gets posted through ecc queue:

****************************************************************************************

var s = new sn_ws.SOAPMessageV2('Amazon', 'ItemSearch');

s.setStringParameterNoEscape('access_key', 'AKIAJDMB2SKKI7I5K2QQ');

s.setStringParameterNoEscape('signature', 'XXX');

var response = s.execute();

******************************************************************************************

Can anyone please help me with my query.

Thanks in advance.

Kind Regards,

Aniket

8 REPLIES 8

Thijs Daemen
Mega Guru

Hi,



By SOAPv2 i assume you are referring to the scoped API. There are now 2 different functions to execute SOAP messages.


The SOAPv2 API: https://developer.servicenow.com/app.do#!/api_doc?to=class__soapmessagev2



You can use execute() and executeAsync(), this last one will sent it through the ECC Queue.



Async: https://developer.servicenow.com/app.do#!/api_doc?to=method_class__executeasync___soapmessagev2


Sync: https://developer.servicenow.com/app.do#!/api_doc?to=method_class__execute___soapmessagev2


Thanks for the reply Thijs Daemen.


I think you are talking about setEccCorrelator.


Even though setEccCorrelator sets the SOAP message through ECC queue, it uses a mid server. But in our case we are not using the mid server and we require to make sure that the SOAP messages pass through the ECC Queue.


DINESH CHINNAD1
Giga Expert

I am also facing the same issue. If anyone know the solution for this please advise


Priya Shekar
Giga Guru

Hi Aniket,



Did you try placing the "true" parameter inside execute() like below,



var s = new sn_ws.SOAPMessageV2('Amazon', 'ItemSearch');


s.setStringParameterNoEscape('access_key', 'AKIAJDMB2SKKI7I5K2QQ');


s.setStringParameterNoEscape('signature', 'XXX');


var response = s.execute(true);



Thanks,


Priya