Expand my Community achievements bar.

We are excited to introduce our latest innovation to enhance the Adobe Campaign user experience — the Adobe Campaign v8 Web User Interface!
SOLVED

Adobe Campaign - SOAP API calls from a external webservice

Avatar

Level 3

Hi,

I wish to call SOAP API from an external webservice/ javascript. Need help on the step by step process. If anybody has tried this before than please help.

 

I tried the below sample code but do not get any result for session and security token

~~ var cnx = new HttpSoapConnection("https://[instance url]/nl/jsp/soaprouter.jsp");
var session = new SoapService(cnx, 'urn:xtk:session');
session.addMethod("Logon", "xtk:session#Logon",
                    ["sessiontoken", "string", "Login", "string", "Password", "string", "Parameters", "NLElement"],
                    ["sessionToken", "string", "sessionInfo", "NLElement", "securityToken", "string"]);

var res = session.Logon("", "username", "password", <param/>);
var sessionToken = res[0];
var securityToken = res[2];

cnx.addTokens(sessionToken, securityToken);
var query = new SoapService(cnx, 'urn:xtk:queryDef');
query.addMethod("ExecuteQuery", "xtk:queryDef#ExecuteQuery",
                    ["sessiontoken", "string", "entity", "NLElement"],
                    ["res", "NLElement"]);

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

Have you replaced "username" and "password" by their actual values in:

var res = session.Logon("", "username", "password", <param/>);

Can you check that you get some activity on the server when doing this?

Thanks,

Florent

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

Have you replaced "username" and "password" by their actual values in:

var res = session.Logon("", "username", "password", <param/>);

Can you check that you get some activity on the server when doing this?

Thanks,

Florent

Avatar

Level 10

Hello,

Did you manage to resolve your issue?

Florent.