Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

[ Campaign Classic ] - Web Service call via REST

Avatar

Level 3

Hi AC Community 

 

I'd like to know why Adobe Campaign API does not support REST web service call and only SOAP as per documentation.

 

Searching for a solid reason to share to one of my customers 

 

Thank you

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @_Clodo_,

you can build REST over SOAP by createing JSSP page in "Dynamic JavaScript pages":

 

    <%@ page import="/nl/core/shared/nl.js"%>
    <%
    loadLibrary("xtk:common.js");
    loadLibrary("xtk:shared/json2.js");
    NL.require('/nl/core/shared/xtk.js')
    .require("/nl/core/api.js")
    .require('/nl/core/jsspcontext.js')

 NL.API.init(request, response, {
    jsonOutput: true
    }, function(jsspContext) {
            response.addHeader("Pragma", "no-cache")
            response.addHeader("Cache-Control", "no-cache");
            response.addHeader("Expires", new Date().toGMTString());
            
            //do something resty
            
    });
%>

Also take a look at other pages in there for inspiration and also take a look at the 'nl/core/api.js'

 

Marcel Szimonisz

MarTech Consultant
for more tips visit my blog
https://www.martechnotes.com/

View solution in original post

7 Replies

Avatar

Correct answer by
Community Advisor

Hello @_Clodo_,

you can build REST over SOAP by createing JSSP page in "Dynamic JavaScript pages":

 

    <%@ page import="/nl/core/shared/nl.js"%>
    <%
    loadLibrary("xtk:common.js");
    loadLibrary("xtk:shared/json2.js");
    NL.require('/nl/core/shared/xtk.js')
    .require("/nl/core/api.js")
    .require('/nl/core/jsspcontext.js')

 NL.API.init(request, response, {
    jsonOutput: true
    }, function(jsspContext) {
            response.addHeader("Pragma", "no-cache")
            response.addHeader("Cache-Control", "no-cache");
            response.addHeader("Expires", new Date().toGMTString());
            
            //do something resty
            
    });
%>

Also take a look at other pages in there for inspiration and also take a look at the 'nl/core/api.js'

 

Marcel Szimonisz

MarTech Consultant
for more tips visit my blog
https://www.martechnotes.com/

Avatar

Level 3

how can i called Dynamic JavaScript pages via external system? means i create a Dynamic JavaScript pages but how to Trigger? like a js code,

 

 

 

Avatar

Level 3

how can i called Dynamic JavaScript pages via external system? means i create a Dynamic JavaScript pages but how to Trigger? like a js code,

 

Avatar

Community Advisor

Hello @wankang 

 

 

 

https://example.com/<your_namespace>/<your_page>.jssp

//example.com is url, where AC web server is running

 

 

 

Avatar

Employee Advisor

REST came out around 2000. Neolane (Adobe Campaign Classic) was founded/created in 2001. REST was simply not mature enough and SOAP was the work horse of the day. 

 

Adobe Campaign Standard has some REST options. 

Adobe Journey Optimizer is completely REST based.

Avatar

Level 3

Hi Dloyd

 

That's really helpful information.

 

Really appreciate that