SOAP calls are not really handy when it comes to deploy to external vendors. Luckily, we can use a classic HTTP Post as we would do for a REST API.

Example with queryDef#ExecuteQuery to get a list of recipients by email

Use the following settings:

  • The soap router as the endpoint
  • HTTP Headers:
    • Set SOAPAction to the method you’re calling, e.g. xtk:queryDef#ExecuteQuery.
    • Set Content-Type to application/xml
<soapenv:Envelope xmlns:soapenv="" xmlns:urn="urn:xtk:queryDef">
          <queryDef operation="select" schema="nms:recipient">
              <node expr="@email"/>
              <node expr="@lastName"/>
              <node expr="@firstName"/>
              <condition expr="@email = ''"/>

To use <urn:sessiontoken> with a login and a password, it must be enabled on your instance. See Adobe Campaign SOAP connectivity


Gives the following response with <recipient-collection>:

<?xml version='1.0' ?>
<SOAP-ENV:Envelope xmlns:xsd="" xmlns:xsi="" xmlns:ns="urn:xtk:queryDef" xmlns:SOAP-ENV="">
    <ExecuteQueryResponse xmlns="urn:xtk:queryDef" SOAP-ENV:encodingStyle="">
      <pdomOutput xsi:type="ns:Element" SOAP-ENV:encodingStyle="">
          <recipient email="" firstName="..." lastName="..."/>
          <recipient email="" firstName="..." lastName="..."/>
          <recipient email="" firstName="..." lastName="..."/>


See Adobe Campaign SOAP calls for details.

Example with a custom Javascript method

1. Data schema

In the data schema myNamespace:myObject:

<method library="myNamespace:myJsCode" name="method1" static="true">
    <param desc="param1" inout="in" name="param1" type="string"/>
    <param desc="return1" inout="out" name="return1" type="long"/>

2. Javascript Code

In the Javascript code myNamespace:myJsCode:

function myNamespace_myObject_method1(vParam1){
  // do things
  return 0;

3. HTTP Post call with SOAP envelope

Keep the same settings as previous section but change the SOAP Action to myNamespace:myObject#method1, and use the following Envelope:

<soapenv:Envelope xmlns:soapenv="" xmlns:urn="urn:myNamespace:myObject">
         <urn:param1>value of parameter 1</urn:param1>

Displays the following response:

<?xml version='1.0' ?>
<SOAP-ENV:Envelope xmlns:xsd="" xmlns:xsi="" xmlns:ns="urn:myNamespace:myObject" xmlns:SOAP-ENV="">
    <method1Response xmlns="urn:myNamespace:myObject" SOAP-ENV:encodingStyle="">
      <return1 xsi:type="xsd:int">0</return1>

Client-side wrapper to get as JSON with NL.DataSource.QueryDef.get()

Get all workflows (limit 15) from JS Chrome Dev tools (client side)

var callbacks = {
  onComplete: function(){console.log('onComplete')},
  onError: function(a){console.warning('onError', a)},
  onSuccess: function(objects, needPagination){console.log('onSuccess', objects, needPagination)},
var q = new NL.DataSource.QueryDef({
  schema: 'xtk:workflow',
  select: {node: [
    {expr: '@id'},
    {expr: '@label'},
    {expr: 'data'}, // get all fields
  where: {condition: [
    {expr: "@label NOT LIKE '%don\\'t use%'"},
var start = 0, lineCount = 15;
q.get(start, lineCount, callbacks);

Client-side wrapper to get as XML with NL.QueryDef.execute()

var a = new NL.QueryDef("nms:delivery","select");
a.asyncTarget.onXtkQueryCompleted = function(queryDef, resultXml, f){console.log('Success!', resultXML)} // <delivery-collection><delivery id="111"></delivery-collection>
a.execute(NL.session.soapRouterURL, "", this);