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

Restful interface instead of soap protocol

Avatar

Level 3

i create a table, a method, and js, so that i can get the wsdl file when login https://server/nl/jsp/schemawsdl.jsp?schema. and then use SOAP protocol call the js, how to use  restful api to call Customize API in ACC not the SOAP protocol ?

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi @wankang,

To create a table, method, and JavaScript (JS) code to retrieve the WSDL file and use the SOAP protocol to call the JS code, and then use a RESTful API to call a custom API in Adobe Campaign Classic (ACC), you can follow the steps below:

  1. You can create a custom table in ACC using the built-in schema editor. This table will store the data that you want to expose via the custom API.
  2. You can create a custom method in ACC using the built-in method editor.
  3. You can create a JSP (JavaServer Pages) page in ACC to generate the WSDL file. The JSP page can be accessed via the URL: https://server/nl/jsp/schemawsdl.jsp?schema.
  4. You can write JS code using a SOAP library to call the custom method exposed via the WSDL file. The JS code can use the SOAP protocol to make a request to the URL of the JSP page created in step 3 and invoke the custom method to fetch the data.
  5. Create a RESTful API in AC: You can use a REST client (e.g., Postman) or write JS code using a REST library to make HTTP requests to the RESTful API.

View solution in original post

7 Replies

Avatar

Community Advisor

Hello @wankang,

SOAP is the native web service feature and REST is not available.
Although you can create REST over SOAP method if you want with JSSP pages and with using

 

NL.API.init

 

take a look at the example here:
https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/campaign-classic-w...

 

 

 

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

Correct answer by
Employee Advisor

Hi @wankang,

To create a table, method, and JavaScript (JS) code to retrieve the WSDL file and use the SOAP protocol to call the JS code, and then use a RESTful API to call a custom API in Adobe Campaign Classic (ACC), you can follow the steps below:

  1. You can create a custom table in ACC using the built-in schema editor. This table will store the data that you want to expose via the custom API.
  2. You can create a custom method in ACC using the built-in method editor.
  3. You can create a JSP (JavaServer Pages) page in ACC to generate the WSDL file. The JSP page can be accessed via the URL: https://server/nl/jsp/schemawsdl.jsp?schema.
  4. You can write JS code using a SOAP library to call the custom method exposed via the WSDL file. The JS code can use the SOAP protocol to make a request to the URL of the JSP page created in step 3 and invoke the custom method to fetch the data.
  5. Create a RESTful API in AC: You can use a REST client (e.g., Postman) or write JS code using a REST library to make HTTP requests to the RESTful API.

Avatar

Level 3

could u give a example, step4 may be using js to create SOAP request, but how to tranfer request data to ACC, before i use SOAP, for step5, Create a RESTful API in AC,  is "AC" means ACC or?

Avatar

Employee Advisor

@wankang,

Here is an example of how to use JavaScript to create a SOAP request-

var soapRequest = '<?xml version="1.0" encoding="utf-8"?> \
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> \
<soap:Body> \
<GetUserDetails xmlns="http://tempuri.org/"> \
<userId>123</userId> \
</GetUserDetails> \
</soap:Body> \
</soap:Envelope>';

// To transfer the SOAP request data to ACC, you would typically use an HTTP POST request to send the data to the ACC server.

Here's an example using jQuery:

$.ajax({
url: 'https://your-acc-server.com/your-soap-endpoint',
type: 'POST',
contentType: 'text/xml',
data: soapRequest,
dataType: 'xml',
success: function(response) {
console.log('SOAP response:', response);
// Parse and process the SOAP response data
// ...
},
error: function(xhr, status, error) {
console.error('SOAP request failed:', error);
}
});

On a side note, "AC" means "Adobe Campaign" (sometimes abbreviated as "AC"); when I said "Create a RESTful API in AC", I meant creating a RESTful API within Adobe Campaign.

Avatar

Administrator

Hi @akshaaga,

Could you please help @wankang further here with their query?

Thanks!



Sukrity Wadhwa