Expand my Community achievements bar.

Adobe Campaign User Groups are live now. Join our Adobe Campaign User Groups and connect with your local leaders!
SOLVED

SOAP Call

Avatar

Level 3

Hello

I am trying to do a SOAP call but I am getting an error message during SOAP call:

Spoiler
http.setRequestHeader is not a function

Am I missing something?

rbiri_0-1718648379010.png

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @rbiri 

 

Are you sending this request to another AC instance or the same instance? If you are getting the data from same instance then there is a better way to do this. 

Here is an example:

  var recipients= xtk.queryDef.create(
        <queryDef operation="select" schema="nms:recipient">
          <select>
            <node expr="@id"/>
             <node expr="@email"/>
          </select>          
        </queryDef>).ExecuteQuery();

for each(var recipient in recipients) { 
 // get your data here
}

 

If you are accessing another instance then you can use the code given here:

https://experienceleague.adobe.com/developer/campaign-api/api/c-HttpClientRequest.html


     Manoj
     Find me on LinkedIn

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hello @rbiri 

 

Are you sending this request to another AC instance or the same instance? If you are getting the data from same instance then there is a better way to do this. 

Here is an example:

  var recipients= xtk.queryDef.create(
        <queryDef operation="select" schema="nms:recipient">
          <select>
            <node expr="@id"/>
             <node expr="@email"/>
          </select>          
        </queryDef>).ExecuteQuery();

for each(var recipient in recipients) { 
 // get your data here
}

 

If you are accessing another instance then you can use the code given here:

https://experienceleague.adobe.com/developer/campaign-api/api/c-HttpClientRequest.html


     Manoj
     Find me on LinkedIn