[ Campaign Classic ] - Web Service call via REST | Community
Skip to main content
Clodo
Adobe Employee
Adobe Employee
April 14, 2022
Solved

[ Campaign Classic ] - Web Service call via REST

  • April 14, 2022
  • 2 replies
  • 3688 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Marcel_Szimonisz

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/

2 replies

Marcel_Szimonisz
Community Advisor
Marcel_SzimoniszCommunity AdvisorAccepted solution
Community Advisor
April 15, 2022

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/

wankang
Level 3
April 17, 2023

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,

 

Marcel_Szimonisz
Community Advisor
Community Advisor
April 17, 2023

Hello @wankang 

 

 

 

https://example.com/<your_namespace>/<your_page>.jssp //example.com is url, where AC web server is running

 

 

 

David_Loyd
Adobe Employee
Adobe Employee
April 15, 2022

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.

Clodo
Adobe Employee
ClodoAdobe EmployeeAuthor
Adobe Employee
April 26, 2022

Hi Dloyd

 

That's really helpful information.

 

Really appreciate that